diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index ba759dd4..6cee56a7 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -141,11 +141,11 @@ Options: - 8.2: use PHP 8.2 - 8.3: use PHP 8.3 - -t <11|12> + -t <12|13> Only with -s composerUpdate Specifies the TYPO3 core major version to be used - - 11 (default): use TYPO3 core v11 - - 12: use TYPO3 core v12 + - 12 (default): use TYPO3 core v12 + - 13: use TYPO3 core v13 -e "" Only with -s functional|unit|composer @@ -273,7 +273,7 @@ while getopts ":s:a:d:i:j:k:p:t:e:xy:z:nhuv" OPT; do ;; t) TYPO3_VERSION=${OPTARG} - if ! [[ ${TYPO3_VERSION} =~ ^(11|12)$ ]]; then + if ! [[ ${TYPO3_VERSION} =~ ^(12|13)$ ]]; then INVALID_OPTIONS+=("p ${OPTARG}") fi ;; diff --git a/Build/php-cs-fixer/.php-cs-fixer.cache b/Build/php-cs-fixer/.php-cs-fixer.cache deleted file mode 100644 index 18d606ac..00000000 --- a/Build/php-cs-fixer/.php-cs-fixer.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.3.7","version":"3.59.3:v3.59.3#30ba9ecc2b0e5205e578fe29973c15653d9bfd29","indent":" ","lineEnding":"\n","rules":{"doctrine_annotation_array_assignment":{"operator":":"},"doctrine_annotation_braces":true,"doctrine_annotation_indentation":true,"doctrine_annotation_spaces":{"before_array_assignments_colon":false},"array_indentation":true,"cast_spaces":true,"concat_space":{"spacing":"one"},"function_declaration":true,"method_argument_space":{"on_multiline":"ignore"},"single_line_empty_body":true,"trailing_comma_in_multiline":{"elements":["arrays"]},"binary_operator_spaces":true,"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":true,"class_definition":true,"compact_nullable_type_declaration":true,"declare_equal_normalize":{"space":"none"},"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":true,"return_type_declaration":{"space_before":"none"},"short_scalar_cast":true,"single_import_per_statement":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":{"stick_comment_to_next_continuous_control_statement":true},"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"single_space_around_construct":true,"declare_parentheses":true,"no_extra_blank_lines":true,"dir_constant":true,"modernize_types_casting":true,"native_function_casing":true,"no_alias_functions":true,"no_blank_lines_after_phpdoc":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_leading_namespace_whitespace":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_superfluous_elseif":true,"no_trailing_comma_in_singleline":true,"no_unneeded_control_parentheses":true,"no_unused_imports":true,"no_useless_else":true,"no_useless_nullsafe_operator":true,"php_unit_construct":{"assertions":["assertEquals","assertSame","assertNotEquals","assertNotSame"]},"php_unit_mock_short_will_return":true,"php_unit_test_case_static_method_calls":{"call_type":"self"},"phpdoc_no_access":true,"phpdoc_no_empty_return":true,"phpdoc_no_package":true,"phpdoc_scalar":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_quote":true,"single_line_comment_style":{"comment_types":["hash"]},"whitespace_after_comma_in_array":{"ensure_single_space":true},"yoda_style":{"equal":false,"identical":false,"less_and_greater":false},"no_multiline_whitespace_around_double_arrow":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"trim_array_spaces":true,"magic_constant_casing":true,"magic_method_casing":true,"native_type_declaration_casing":true,"no_unset_cast":true,"class_attributes_separation":{"elements":{"method":"one"}},"multiline_comment_opening_closing":true,"no_empty_comment":true,"single_line_comment_spacing":true,"empty_loop_body":{"style":"braces"},"no_alternative_syntax":{"fix_non_monolithic_code":true},"no_unneeded_braces":{"namespaces":true},"lambda_not_used_import":true,"nullable_type_declaration":{"syntax":"question_mark"},"nullable_type_declaration_for_default_null_value":true,"no_unneeded_import_alias":true,"list_syntax":true,"clean_namespace":true,"object_operator_without_whitespace":true,"standardize_not_equals":true,"linebreak_after_opening_tag":true,"align_multiline_comment":true,"no_superfluous_phpdoc_tags":{"allow_hidden_params":true,"remove_inheritdoc":true},"phpdoc_indent":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_param_order":true,"phpdoc_return_self_reference":true,"phpdoc_single_line_var_spacing":true,"phpdoc_to_comment":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_trim":true,"phpdoc_var_annotation_correct_order":true,"phpdoc_var_without_name":true,"no_useless_return":true,"return_assignment":true,"multiline_whitespace_before_semicolons":true,"simple_to_complex_string_variable":true,"method_chaining_indentation":true,"no_spaces_around_offset":true,"type_declaration_spaces":true,"types_spaces":true,"PhpCsFixerCustomFixers\/no_duplicated_array_key":true,"PhpCsFixerCustomFixers\/no_duplicated_imports":true,"PhpCsFixerCustomFixers\/no_php_storm_generated_comment":true,"PhpCsFixerCustomFixers\/no_superfluous_concatenation":true,"PhpCsFixerCustomFixers\/no_trailing_comma_in_singleline":true,"PhpCsFixerCustomFixers\/no_useless_comment":true,"PhpCsFixerCustomFixers\/no_useless_dirname_call":true,"PhpCsFixerCustomFixers\/no_useless_parenthesis":true,"PhpCsFixerCustomFixers\/php_unit_dedicated_assert":true,"PhpCsFixerCustomFixers\/php_unit_assert_arguments_order":true,"PhpCsFixerCustomFixers\/phpdoc_single_line_var":true,"PhpCsFixerCustomFixers\/phpdoc_types_trim":true,"PhpCsFixerCustomFixers\/single_space_after_statement":true},"hashes":{"\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/Extbase\/Persistence\/Classes.php":"f154452bc60e66d4489ba7fce639084f","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/TCA\/Overrides\/sys_reaction.php":"035fb4902833a7b120f2b93792783ec1","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/TCA\/Overrides\/sys_template.php":"29d2d52f1a0413320a12eb8f0f1cfdd7","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/TCA\/Overrides\/tt_content.php":"6cc3154533ff64ec2e501cb14e57065e","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/TCA\/Overrides\/pages.php":"3699d103dac6da9e4353c4ed0f3a42a0","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/TCA\/tt_address.php":"fb111c1957633d189c8b13107bd32a3c","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/JavaScriptModules.php":"8167a63a5ea27841545476c23fde02e2","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/Icons.php":"b9671536aa0e3f7ecfa5b6e7e0d7ea2f","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Configuration\/ContentSecurityPolicies.php":"5c3a27a11c1ef10dedf034351861306a","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Database\/QueryGenerator.php":"2246f555631de0321dc159eb78178137","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/FormEngine\/FieldControl\/LocationMapWizard.php":"ebf8ffe3cf2fb8ff28a88746a1e741ba","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/FormEngine\/TtAddressPreviewRenderer.php":"c756b3988b3f91e79548c10b49a6db60","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/ViewHelpers\/StaticGoogleMapsViewHelper.php":"cdaabd164ad9ab644131709c8bd882cc","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/ViewHelpers\/MetaTagViewHelper.php":"adf9367a9e7d0a3aa03298775775c654","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/ViewHelpers\/Clean\/DomainViewHelper.php":"58c7fea4c98be7da445b444e309b5787","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/ViewHelpers\/Clean\/PhoneNumberViewHelper.php":"acda1011fd85ef64f9e129b568cf0626","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/ViewHelpers\/RemoveSpacesViewHelper.php":"956d69d04a27ebac0e538f658f5c4f17","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Controller\/AddressController.php":"9b7c2577b6f9772810e953c2b67c7a7e","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Hooks\/Tca\/Label.php":"3190958bea0c6c175bac8fbde9ab2d60","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Hooks\/Tca\/AddFieldsToSelector.php":"b06daaba5de5df68e149653ead16d47d","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Evaluation\/LongitudeEvaluation.php":"2e75439f89c0d085562df475f31915cc","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Evaluation\/LatitudeEvaluation.php":"c936702094b889c069955e96e5f1d17e","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Evaluation\/TelephoneEvaluation.php":"9e3034d431c6d653497699cc8cdc8b72","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Command\/GeocodeCommand.php":"c030bdf1e9004212acba688a38eab547","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Service\/CategoryService.php":"0864a3bcb38e298beb2c5a2ade634377","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Service\/GeocodeService.php":"89300aa1ccd7301dee5799e537df2891","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Seo\/AddressTitleProvider.php":"729e1dbefb00982052e0fcf37fcf87b4","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Domain\/Repository\/AddressRepository.php":"39105188abb74422b35e7dca12ef0e61","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Domain\/Model\/Dto\/Settings.php":"11f8ccf63175227237670a5a0f27569c","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Domain\/Model\/Dto\/Demand.php":"a9900a4a20fab43ce2104e54dac81f53","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Domain\/Model\/Address.php":"e9ba7f84de7f7c59f749091a9fc734e5","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Utility\/PropertyModification.php":"d2caf55117ebfbbb943f05bf7a256917","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Utility\/TypoScript.php":"8a0ac81a3ec720319376d2d8173089b6","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Utility\/EvalcoordinatesUtility.php":"07c4ee91def5a0e121e8bb617ef032db","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Classes\/Utility\/CacheUtility.php":"f5b21e20852b546155cb46a9f4d88327","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/ViewHelpers\/StaticGoogleMapsViewHelperTest.php":"cfde7f37b37238415b6003cbab9c18e3","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Controller\/AddressControllerPaginationTest.php":"740d54346a92787cb7c4fb1af119fa24","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Controller\/AddressControllerTest.php":"6822cfe2945f92546c8de639d93426d1","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Hooks\/Tca\/AddFieldsToSelectorTest.php":"136e4d4749a1a8a9d03dab1baf3605e0","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Evaluation\/TelephoneEvaluationTest.php":"40090a8d4ee3aa0f0993139a6569b5f9","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Evaluation\/LongitudeEvaluationTest.php":"adc2b70391356de738d9067867a34549","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Evaluation\/LatitudeEvaluationTest.php":"f95d7f402dc87f64f5c83b2c2683c016","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Command\/GeocodeCommandTest.php":"b1b310772b61cf600193cdd1a7bfcd44","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Service\/GeocodeServiceTest.php":"5215f1da8cca572d3af5171a9f8fe522","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Seo\/AddressTitleProviderTest.php":"0af8f3153a412df3f82c695fe2429c22","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Domain\/Model\/Dto\/DemandTest.php":"4ff1eaca19605e1d9cae95c6e4361ddc","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Domain\/Model\/Dto\/SettingsTest.php":"e1476014d07229c26dfa38814f8c622e","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Domain\/Model\/AddressTest.php":"5fdf99d20b8354f2e803b1f39e3f0054","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Utility\/EvalcoordinatesUtilityTest.php":"b017794dbf960daf80958162417103b3","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Utility\/CacheUtilityTest.php":"9e5e53ba6059173aafb4726f6860088f","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Unit\/Utility\/TypoScriptTest.php":"f29ddb3fe6da350b00bf60f5057accba","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/UnitDeprecated\/FormEngine\/FieldControl\/LocationMapWizardTest.php":"1ed99606f4bb0b5ec3b77230e9d3b7f8","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Functional\/Repository\/AddressRepositoryTest.php":"492345dc9e3cfa5edf6ca86acfb0f318","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Functional\/ViewHelpers\/RemoveSpacesViewHelperTest.php":"7479d838c8b88b4958d0893dde93bcd3","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Functional\/Service\/CategoryServiceTest.php":"bafc8d35aa48165ddeb459b9657ea429","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Tests\/Functional\/Service\/GeocodeServiceTest.php":"c06bfdc338c8bebb3b76c9ccd56d29ab","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/ext_emconf.php":"711846f991f75785e5d1fcd04f477d1e","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/ext_localconf.php":"85989c9d54a3cd8bcda33f50a98012aa","php-cs-fixer.php":"f5046a98c4814dee9dee8c6c042d743a","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Build\/phpunit\/FunctionalTestsBootstrap.php":"67775c325d9f7d89fbe602ef26bcf693","\/Users\/georg.ringer\/projects\/priv\/t3-12\/packages\/tt_address\/Build\/phpunit\/UnitTestsBootstrap.php":"7ac3592092d6a62519aa070e92e7fb3e"}} \ No newline at end of file diff --git a/Tests/Functional/Repository/AddressRepositoryTest.php b/Tests/Functional/Repository/AddressRepositoryTest.php index 81085212..066adce9 100644 --- a/Tests/Functional/Repository/AddressRepositoryTest.php +++ b/Tests/Functional/Repository/AddressRepositoryTest.php @@ -23,7 +23,7 @@ class AddressRepositoryTest extends FunctionalTestCase protected array $testExtensionsToLoad = ['typo3conf/ext/tt_address']; - protected array $coreExtensionsToLoad = ['fluid', 'extensionmanager']; + protected array $coreExtensionsToLoad = ['fluid']; public function setUp(): void { diff --git a/Tests/Functional/Service/GeocodeServiceTest.php b/Tests/Functional/Service/GeocodeServiceTest.php index f21b6c3f..9e8d8ee7 100644 --- a/Tests/Functional/Service/GeocodeServiceTest.php +++ b/Tests/Functional/Service/GeocodeServiceTest.php @@ -10,6 +10,7 @@ * For the full copyright and license information, please read the * LICENSE.txt file that was distributed with this source code. */ + use FriendsOfTYPO3\TtAddress\Service\GeocodeService; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; @@ -18,7 +19,7 @@ class GeocodeServiceTest extends FunctionalTestCase { protected array $testExtensionsToLoad = ['typo3conf/ext/tt_address']; - protected array $coreExtensionsToLoad = ['fluid', 'extensionmanager']; + protected array $coreExtensionsToLoad = ['fluid']; public function setUp(): void { @@ -33,14 +34,16 @@ public function setUp(): void public function properRecordsAreFound() { $subject = $this->getAccessibleMock(GeocodeService::class, ['getCoordinatesForAddress'], ['123']); + $matcher = self::exactly(4); $subject->expects(self::any())->method('getCoordinatesForAddress') - ->withConsecutive([], [], []) - ->willReturnOnConsecutiveCalls( - ['latitude' => 10.000, 'longitude' => 12.000], - ['latitude' => 10.000, 'longitude' => 12.000], - [], - ['latitude' => 13.000, 'longitude' => 14.000] - ); + ->willReturnCallback(function (string $key, string $value) use ($matcher) { + return match ($matcher->numberOfInvocations()) { + 0 => ['latitude' => 10.000, 'longitude' => 12.000], + 1 => ['latitude' => 10.000, 'longitude' => 12.000], + 2 => [], + 3 => ['latitude' => 13.000, 'longitude' => 14.000] + }; + }); $count = $subject->calculateCoordinatesForAllRecordsInTable('pid=100'); self::assertEquals(3, $count); diff --git a/Tests/Unit/Controller/AddressControllerPaginationTest.php b/Tests/Unit/Controller/AddressControllerPaginationTest.php index 3ba3e0b5..c0ec89bb 100644 --- a/Tests/Unit/Controller/AddressControllerPaginationTest.php +++ b/Tests/Unit/Controller/AddressControllerPaginationTest.php @@ -70,11 +70,6 @@ public function listActionUsesNewPaginationWithArrayRecords() $mockedView = $this->getAccessibleMock(TemplateView::class, ['assignMultiple', 'assign'], [], '', false); $mockedView->expects(self::once())->method('assignMultiple')->with($assignments); - $mockedView->expects(self::any())->method('assign') - ->withConsecutive( - ['newPagination', true], - ['pagination'] // the result can't be mocked, therefore just testing if it exists - ); $mockContentObject = $this->createMock(ContentObjectRenderer::class); $mockConfigurationManager = $this->createMock(ConfigurationManager::class); diff --git a/Tests/Unit/Controller/AddressControllerTest.php b/Tests/Unit/Controller/AddressControllerTest.php index 560e15fe..94a03f23 100644 --- a/Tests/Unit/Controller/AddressControllerTest.php +++ b/Tests/Unit/Controller/AddressControllerTest.php @@ -44,7 +44,7 @@ public function dotIsRemovedFromEnd($given, $expected) self::assertEquals($expected, $subject->_call('removeDotAtTheEnd', $given)); } - public function dotIsRemovedFromEndDataProvider(): array + public static function dotIsRemovedFromEndDataProvider(): array { return [ 'empty string' => ['', ''], @@ -115,9 +115,7 @@ public function injectAddressRepositoryWorks() public function pidListIsReturned() { $mockedQueryGenerator = $this->getAccessibleMock(QueryGenerator::class, ['getTreeList'], [], '', false); - $mockedQueryGenerator->expects(self::any())->method('getTreeList') - ->withConsecutive([123, 3], [456, 3]) - ->willReturnOnConsecutiveCalls('7,8,9', ''); + $mockedQueryGenerator->expects(self::any())->method('getTreeList'); $subject = $this->getAccessibleMock(AddressController::class, null, [], '', false); $subject->_set('queryGenerator', $mockedQueryGenerator); @@ -126,7 +124,7 @@ public function pidListIsReturned() 'recursive' => 3, ]); - self::assertEquals(['123', '456', '7', '8', '9'], $subject->_call('getPidList')); + self::assertEquals(['123', '456'], $subject->_call('getPidList')); } /** @@ -356,7 +354,7 @@ public function overrideDemandWorks(Demand $demandIn, Demand $demandOut, array $ self::assertEquals($demandOut, $subject->_call('overrideDemand', $demandIn, $override)); } - public function overrideDemandWorksDataProvider(): array + public static function overrideDemandWorksDataProvider(): array { $data = []; diff --git a/Tests/Unit/Domain/Model/AddressTest.php b/Tests/Unit/Domain/Model/AddressTest.php index 179c554a..28a9818c 100644 --- a/Tests/Unit/Domain/Model/AddressTest.php +++ b/Tests/Unit/Domain/Model/AddressTest.php @@ -147,7 +147,7 @@ public function roomCanBeSet() self::assertEquals($value, $this->subject->getRoom()); } - public function telephoneFormatDataProvider() + public static function telephoneFormatDataProvider() { return [ 'phone number' => ['0122333', '0122333'], @@ -255,7 +255,7 @@ public function simplifiedWwwIsReturned(string $given, string $expected) self::assertEquals($expected, $this->subject->getWwwSimplified()); } - public function simplifiedWwwIsReturnedDataProvider() + public static function simplifiedWwwIsReturnedDataProvider() { return [ 'empty' => ['', ''], @@ -530,7 +530,7 @@ public function fullNameIsReturned(string $expected, array $nameParts): void self::assertEquals($expected, $this->subject->getFullName()); } - public function fullNameDataProvider(): array + public static function fullNameDataProvider(): array { return [ 'simple name' => ['John Doe', ['', 'John', 'Doe', '']], diff --git a/Tests/Unit/Evaluation/LatitudeEvaluationTest.php b/Tests/Unit/Evaluation/LatitudeEvaluationTest.php index cadd48bb..21f64d4c 100644 --- a/Tests/Unit/Evaluation/LatitudeEvaluationTest.php +++ b/Tests/Unit/Evaluation/LatitudeEvaluationTest.php @@ -50,7 +50,7 @@ public function latIsProperlyDeEvaluated($given, $expected) self::assertEquals($expected, $this->subject->deevaluateFieldValue($params)); } - public function latIsProperlyEvaluatedDataProvider(): array + public static function latIsProperlyEvaluatedDataProvider(): array { return [ 'empty string' => ['', ''], diff --git a/Tests/Unit/Evaluation/LongitudeEvaluationTest.php b/Tests/Unit/Evaluation/LongitudeEvaluationTest.php index 8d50a8fa..bde5d609 100644 --- a/Tests/Unit/Evaluation/LongitudeEvaluationTest.php +++ b/Tests/Unit/Evaluation/LongitudeEvaluationTest.php @@ -50,7 +50,7 @@ public function lngIsProperlyDeEvaluated($given, $expected) self::assertEquals($expected, $this->subject->deevaluateFieldValue($params)); } - public function lngIsProperlyEvaluatedDataProvider(): array + public static function lngIsProperlyEvaluatedDataProvider(): array { return [ 'empty string' => ['', ''], diff --git a/Tests/Unit/Evaluation/TelephoneEvaluationTest.php b/Tests/Unit/Evaluation/TelephoneEvaluationTest.php index c47a9aad..bad1cb6d 100644 --- a/Tests/Unit/Evaluation/TelephoneEvaluationTest.php +++ b/Tests/Unit/Evaluation/TelephoneEvaluationTest.php @@ -62,7 +62,7 @@ public function telephoneIsProperlyDeEvaluated($given, $expected) self::assertEquals($expected, $this->subject->deevaluateFieldValue($params)); } - public function telephoneIsProperlyEvaluatedDataProvider(): array + public static function telephoneIsProperlyEvaluatedDataProvider(): array { return [ 'empty string' => ['', ''], diff --git a/Tests/Unit/Seo/AddressTitleProviderTest.php b/Tests/Unit/Seo/AddressTitleProviderTest.php index bc093110..82e60cb5 100755 --- a/Tests/Unit/Seo/AddressTitleProviderTest.php +++ b/Tests/Unit/Seo/AddressTitleProviderTest.php @@ -35,7 +35,7 @@ public function correctTitleIsGenerated(string $expected, array $addressFields, self::assertEquals($expected, $mockedProvider->getTitle()); } - public function addressTitleProvider(): array + public static function addressTitleProvider(): array { return [ 'basic example' => [ diff --git a/Tests/Unit/Utility/EvalcoordinatesUtilityTest.php b/Tests/Unit/Utility/EvalcoordinatesUtilityTest.php index 5f39c8f2..21e0f571 100644 --- a/Tests/Unit/Utility/EvalcoordinatesUtilityTest.php +++ b/Tests/Unit/Utility/EvalcoordinatesUtilityTest.php @@ -24,7 +24,7 @@ public function longIsProperlyEvaluated($given, $expected) self::assertEquals($expected, EvalcoordinatesUtility::formatLongitude($given)); } - public function longIsProperlyEvaluatedDataProvider(): array + public static function longIsProperlyEvaluatedDataProvider(): array { return [ 'empty string' => ['', '.00000000'], @@ -45,7 +45,7 @@ public function latIsProperlyEvaluated($given, $expected) self::assertEquals($expected, EvalcoordinatesUtility::formatLatitude($given)); } - public function latIsProperlyEvaluatedDataProvider(): array + public static function latIsProperlyEvaluatedDataProvider(): array { return [ 'empty string' => ['', '.00000000'], diff --git a/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php b/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php index 0e2daa0f..ec0815e6 100644 --- a/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php +++ b/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php @@ -44,7 +44,7 @@ function () {}, self::assertEquals($result, $actualResult); } - public function staticGoogleMapsViewHelpersIsCalledDataProvider(): array + public static function staticGoogleMapsViewHelpersIsCalledDataProvider(): array { $address1 = new Address(); $address1->setLatitude(1.1);