Commit Graph

38 Commits

Author SHA1 Message Date
Michael Voříšek
6377477eb2 Add PHPUnit 10.x and 11.x support (#9480)
* Add PHPUnit 10.x and 11.x support

* fix undefined TestCase::getName() for PHPUnit 10+

* Add PHPUnit attributes but keep annotations
2024-06-13 18:40:29 +02:00
Michael Voříšek
f4272804d6 Rename test files for PHPUnit 10+ (#9477) 2024-06-05 07:46:51 +02:00
Michael Voříšek
6a5f9ee7ce Add override method attributes (#9272) 2024-06-02 15:57:56 +02:00
Michael Voříšek
d18406a8bd Fix binary operator spaces CS (#9330)
* align_single_space_minimal for assign

* assign operators grouping is not supported by PHP CS Fixer

* binary_operator_spaces = single_space

* fix anonymous function on single line

* align comments manually
2024-02-02 07:53:34 +01:00
Michael Voříšek
54f4aa33f9 Fix CS - imports (#9316)
* fix Tests\Browser\TestCase imports

* fix remaining imports

* fix PHPUnit\Framework\TestCase imports

* import GuzzleHttp\Client

* fix remaining

* "php_unit_method_casing" is not todo

* fix "single_line_comment_spacing"

* fix 2nd commit done using older fixer
2024-01-21 19:13:31 +01:00
Michael Voříšek
6a53a1d853 Fix CS (whitespace, visibility) (#9297)
* Fix "method_argument_space"

* Fix "control_structure_continuation_position"

* Fix "new_with_parentheses"

* Fix "blank_line_before_statement"

* Fix "visibility_required"

* Fix some "array_indentation"

* Fix some "array_indentation" - unify all "rcube::raise_error" calls

* rm useless eslint ignores and add rules counts

* sort eslint ignores

* fix eslint ignores grammar

* Revert "Fix "blank_line_before_statement""

* fix CS 3.46.0
2024-01-04 14:26:35 +01:00
Michael Voříšek
a9167a0d2f Fix "static_lambda" CS (#9276) 2023-12-20 20:01:00 +01:00
Michael Voříšek
8c82b29baf Assert expected data types in tests (#9268)
* fix test skips for local testing

* fix Actions_Mail_Search tests when run /w non-UTC default TZ

* improve tests before PHP CS Fixer is run

* fix "php_unit_strict"
2023-12-17 15:03:08 +01:00
Michael Voříšek
e7d7e62146 Modernize more basic CS II (#9254)
* fix "integer_literal_case"

* fix "phpdoc_separation"

* fix "phpdoc_var_without_name"

* fix "operator_linebreak"

* fix "no_alias_language_construct_call"

* fix "list_syntax"

* fix "concat_space"

* fix "array_syntax"

* fix "binary_operator_spaces"

* fix "binary_operator_spaces" relaxed

* fix "phpdoc_types_order"

* fix "phpdoc_trim"

* fix "native_type_declaration_casing"

* fix "method_chaining_indentation"

* fix "phpdoc_no_package"

* fix "elseif"

* fix PHP CS Fixer config itself too

* fix "native_type_declaration_casing"
2023-12-17 13:14:45 +01:00
Michael Voříšek
ca8b17d191 Modernize more basic CS (#9258)
* fix "yoda_style"

* fix "is_null"

* rm useless rule ignores

* add full "PhpCsFixer:risky" ruleset

* fix "implode_call"

* fix "no_alias_functions"

* fix "array_push"

* fix "long_to_shorthand_operator"

* fix "ternary_to_elvis_operator"

* fix "logical_operators"

* fix "fopen_flags"

* rename "returns" phpdoc tags to "return"

* fix "php_unit_construct"

* fix "function_to_constant"

* fix "php_unit_data_provider_return_type"

* fix "php_unit_set_up_tear_down_visibility"

* some safe "string_length_to_empty"

* fix "phpdoc_align"

* fix "phpdoc_no_alias_tag"

* fix "trailing_comma_in_multiline"

---------

Co-authored-by: Aleksander Machniak <alec@alec.pl>
2023-12-17 09:51:11 +01:00
Michael Voříšek
a8707ae220 Fix and assert basic CS using CI (#9246)
* Assert CS using CI

* fix "single_blank_line_at_eof"

* fix "statement_indentation"

* fix "switch_case_semicolon_to_colon"

* fix "control_structure_braces"

* fix "statement_indentation"

* fix "no_whitespace_in_blank_line"

* fix "no_trailing_whitespace_in_comment"

* fix "no_trailing_whitespace"

* fix "single_space_around_construct"

* fix "spaces_inside_parentheses"

* fix "ternary_operator_spaces"

* fix "trim_array_spaces"

* fix "whitespace_after_comma_in_array"

* fix "cast_spaces"

* fix "unary_operator_spaces"

* fix "no_trailing_comma_in_singleline"

* fix "ordered_imports"

* fix "no_unused_imports"

* Check composer.json format

* fix CI job name

* file header comments are not phpdoc

* fix "phpdoc_indent"

* fix "braces_position"

* fix "phpdoc_types"

* fix "no_blank_lines_after_class_opening"

* fix "no_multiple_statements_per_line"

* fix "multiline_comment_opening_closing"

* fix "single_line_empty_body"

* fix "non_printable_character"

* fix "phpdoc_trim_consecutive_blank_line_separation"

* fix "include"

* fix "no_mixed_echo_print"

---------

Co-authored-by: Aleksander Machniak <alec@alec.pl>
2023-12-16 15:37:43 +01:00
Aleksander Machniak
965fd90284 Browser Tests: The last attempt on mobile menu issues
If this does not work I give up. Tests work on my computer, but not on GA,
and I don't know really why.
2023-11-26 18:29:26 +01:00
Aleksander Machniak
1f20e7575b Fix browser test regression 2022-04-10 11:13:40 +02:00
Aleksander Machniak
9c91580ab5 Browser tests: Force imap reconnection often 2021-08-04 13:02:03 +02:00
Aleksander Machniak
89e54718ca Migration to PHPUnit v9 2021-07-25 11:07:56 +02:00
Aleksander Machniak
d0eb1eebb8 GA: Skip one flaky browser test 2021-07-10 08:31:44 +02:00
Josh Soref
203f456620 Spelling (#8001) 2021-04-18 08:43:18 +02:00
Aleksander Machniak
234f877f5f Another fix for browser tests on Travis 2021-01-01 12:52:05 +01:00
Aleksander Machniak
545a1569f1 Steps -> Actions refactoring (#7688)
* Move action handling code to rcmail class
* Add rcmail_action class
* Add action aliases
* Get rid of $OUTPUT global
* Move some methods from rcmail to rcmail_action
* PHP8 compat. fixes
* Add framework for testing actions
* Fix obvious code mistakes
2020-11-01 11:25:38 +01:00
Aleksander Machniak
9f53d216dd Elastic: Improve styles specificity, fixed browser tests 2020-07-03 11:14:17 +02:00
PhilW
5685891968 fix failing test 2020-06-14 19:04:38 +01:00
Aleksander Machniak
b2391417b3 Tests: Add browser test for #7231 2020-02-26 20:18:48 +01:00
Aleksander Machniak
80a244756d Tests: Add couple of HTML editor tests (including bug #7230) 2020-02-23 19:05:21 +01:00
Aleksander Machniak
84aa5d93f1 Tests: Added browser tests for Archive plugin 2020-01-24 12:07:58 +01:00
Aleksander Machniak
d1b61410fc Tests: Add Dialog component 2020-01-19 14:02:37 +01:00
Aleksander Machniak
b536e18d97 Tests: Add contacts print test 2020-01-18 14:25:08 +01:00
Aleksander Machniak
2f20f43cbb Tests: Change structure of tests 2020-01-18 13:58:36 +01:00
Aleksander Machniak
c2c85b0a76 Tests: Fix Print test on mobile, make GreenMail quiet on folder deletion 2020-01-17 19:58:57 +01:00
Aleksander Machniak
62fb938260 Tests: Add browser test for mail print and bug #7169 2020-01-14 19:31:03 +01:00
Aleksander Machniak
5c73848499 Tests: Add Browser::assertElementsCount() helper 2020-01-14 19:23:52 +01:00
Aleksander Machniak
c2e348067e Add browser tests for "more recipients" dialog 2020-01-13 21:05:41 +01:00
Aleksander Machniak
c4f114fa84 Add browser tests for mail preview 2020-01-11 21:25:45 +01:00
Aleksander Machniak
31b0275573 Add basic browser tests for message menu and open in new window feature 2020-01-09 20:25:26 +01:00
Aleksander Machniak
cf8277ea3e Tests: Try to fix test that fails on Travis, but not on my setup 2020-01-04 14:30:57 +01:00
Aleksander Machniak
f72054e761 Tests: Create Browser and Components for better code structure 2020-01-04 14:01:16 +01:00
Aleksander Machniak
934382c91f Make testing in all phone/tablet/desktop modes of Elastic possible 2020-01-02 18:12:25 +01:00
Aleksander Machniak
59e1efb595 Add more in-browser tests 2020-01-01 18:20:13 +01:00
Aleksander Machniak
0b9ff6426e Rewrite Selenium tests with use of laravel/dusk 2019-12-29 12:00:15 +01:00