diff options
author | Dave Long <dave@longwaveconsulting.com> | 2024-02-14 13:38:28 +0000 |
---|---|---|
committer | Dave Long <dave@longwaveconsulting.com> | 2024-02-14 13:38:28 +0000 |
commit | 654b1f2074ea90b75a8750f2bc1ad0b398708206 (patch) | |
tree | ae581d4eb0e05bd2d33d895104ef435fce07e57c /core | |
parent | 4c6cd6e343bc18830b306e89b287b1a2c20d0ecd (diff) | |
download | drupal-654b1f2074ea90b75a8750f2bc1ad0b398708206.tar.gz drupal-654b1f2074ea90b75a8750f2bc1ad0b398708206.zip |
Issue #3353210 by mondrake, PrabuEla, Spokje: [PHPUnit 10] @dataProvider methods must be declared static and public
Diffstat (limited to 'core')
674 files changed, 995 insertions, 995 deletions
diff --git a/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php b/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php index 012ba4bf5e4..7161ece790e 100644 --- a/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php +++ b/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php @@ -68,7 +68,7 @@ class AnnounceFetcherTest extends AnnounceTestBase { /** * Data provider for testShowAnnouncements(). */ - public function providerShowAnnouncements(): array { + public static function providerShowAnnouncements(): array { return [ '1' => [ 'feed_item' => [ diff --git a/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php b/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php index 6e8f9097fb2..f919d86c1cf 100644 --- a/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php +++ b/core/modules/announcements_feed/tests/src/Unit/AnnounceFetcherUnitTest.php @@ -57,7 +57,7 @@ class AnnounceFetcherUnitTest extends UnitTestCase { /** * Data for the testValidateUrl. */ - public function urlProvider(): array { + public static function urlProvider(): array { return [ ['https://www.drupal.org', TRUE], ['https://drupal.org', TRUE], diff --git a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php index 80adf4ec548..e2121ca8a83 100644 --- a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php +++ b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php @@ -20,7 +20,7 @@ class BlockedIpsTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['blocked_ips'] = [ diff --git a/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php b/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php index cedb65d997d..864449845b7 100644 --- a/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php +++ b/core/modules/big_pipe/tests/src/Unit/Render/Placeholder/BigPipeStrategyTest.php @@ -63,7 +63,7 @@ class BigPipeStrategyTest extends UnitTestCase { /** * @see \Drupal\big_pipe_test\BigPipePlaceholderTestCases */ - public function placeholdersProvider() { + public static function placeholdersProvider() { $cases = BigPipePlaceholderTestCases::cases(); // Generate $placeholders variable as expected by diff --git a/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php b/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php index 08682e400c7..34388d32ead 100644 --- a/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php +++ b/core/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php @@ -37,7 +37,7 @@ final class ContentLengthTest extends UnitTestCase { $this->assertSame((string) $expected_header, $response->headers->get('Content-Length')); } - public function providerTestSetContentLengthHeader() { + public static function providerTestSetContentLengthHeader() { $response = new Response('Test content', 200); $response->headers->set('Content-Length', (string) strlen('Test content')); return [ diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php index b0f507e126e..a6621f972f0 100644 --- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php +++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php @@ -20,7 +20,7 @@ class BlockTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php index 18dd8041350..479318646b4 100644 --- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php +++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d6/BlockTranslationTest.php @@ -21,7 +21,7 @@ class BlockTranslationTest extends BlockTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // Test data is the same as BlockTest, but with the addition of i18n_blocks. $tests = parent::providerSource(); diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php index b186fc95f7e..49b60c767e2 100644 --- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php +++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php @@ -23,7 +23,7 @@ class BlockTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // The source data. $tests[0]['source_data']['block'] = [ diff --git a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php index a5abcdf5962..15ac1c718fb 100644 --- a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php +++ b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php @@ -112,7 +112,7 @@ class BlockRepositoryTest extends UnitTestCase { $this->assertEquals($expected_blocks, $result); } - public function providerBlocksConfig() { + public static function providerBlocksConfig() { $blocks_config = [ 'block1' => [ AccessResult::allowed(), 'top', 0, diff --git a/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php b/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php index 589d1c3f4b2..f54c2a90775 100644 --- a/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php +++ b/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php @@ -61,7 +61,7 @@ class CategoryAutocompleteTest extends UnitTestCase { * * @return array */ - public function providerTestAutocompleteSuggestions() { + public static function providerTestAutocompleteSuggestions() { $test_parameters = []; $test_parameters[] = [ 'string' => 'Com', diff --git a/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php b/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php index 06093da237d..52e28bc45b9 100644 --- a/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php +++ b/core/modules/block/tests/src/Unit/Menu/BlockLocalTasksTest.php @@ -83,7 +83,7 @@ class BlockLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function providerTestBlockAdminDisplay() { + public static function providerTestBlockAdminDisplay() { return [ ['block.admin_display', [['block.admin_display'], ['block.admin_display_theme:test_b', 'block.admin_display_theme:test_c']]], ['block.admin_display_theme', [['block.admin_display'], ['block.admin_display_theme:test_b', 'block.admin_display_theme:test_c']]], diff --git a/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php b/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php index 5842e957d6d..e057917bb5c 100644 --- a/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php +++ b/core/modules/block/tests/src/Unit/Plugin/DisplayVariant/BlockPageVariantTest.php @@ -68,7 +68,7 @@ class BlockPageVariantTest extends UnitTestCase { ->getMock(); } - public function providerBuild() { + public static function providerBuild() { $blocks_config = [ 'block1' => [ // region, is main content block, is messages block, is title block diff --git a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php index 1aaaf0c451b..38a14531fdb 100644 --- a/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php +++ b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php @@ -40,7 +40,7 @@ class BlockSettingsTest extends UnitTestCase { /** * Provides data for testTransform. */ - public function providerTestTransform() { + public static function providerTestTransform() { return [ 'title set' => [ [ diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php index 6d676ddb3f3..97de5d8f204 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php @@ -191,7 +191,7 @@ class BlockContentAccessHandlerTest extends KernelTestBase { /** * Data provider for testAccess(). */ - public function providerTestAccess(): array { + public static function providerTestAccess(): array { $cases = [ 'view:published:reusable' => [ 'view', diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php index daeace75e23..db07637d86f 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php @@ -177,7 +177,7 @@ class BlockContentEntityReferenceSelectionTest extends KernelTestBase { /** * Provides possible fields and condition types. */ - public function fieldConditionProvider() { + public static function fieldConditionProvider() { $cases = []; foreach (['base', 'group', 'nested_group'] as $condition_type) { foreach ([TRUE, FALSE] as $reusable) { diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php index 7f84eb58202..25bbe2fe3f5 100644 --- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php +++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTest.php @@ -20,7 +20,7 @@ class BoxTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['boxes'] = [ diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php index 548c65d1e4d..baa43d5634a 100644 --- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php +++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d6/BoxTranslationTest.php @@ -23,7 +23,7 @@ class BoxTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php index 3a2e02d534f..a017a86ec68 100644 --- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php +++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTest.php @@ -20,7 +20,7 @@ class BlockCustomTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['block_custom'] = [ diff --git a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php index ef8dccbc17e..16e967b7e6c 100644 --- a/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php +++ b/core/modules/block_content/tests/src/Kernel/Plugin/migrate/source/d7/BlockCustomTranslationTest.php @@ -23,7 +23,7 @@ class BlockCustomTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php b/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php index 338240e751c..5abd871079a 100644 --- a/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php +++ b/core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php @@ -142,7 +142,7 @@ class DependentAccessTest extends UnitTestCase { * mergeAccessDependency() first. A call to either should behave the same on a * new RefinableDependentAccessInterface object. */ - public function providerTestSetFirst() { + public static function providerTestSetFirst() { return [ [TRUE], [FALSE], diff --git a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php index 1da30a5e54d..b81ad890520 100644 --- a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php +++ b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php @@ -80,7 +80,7 @@ class BlockContentLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getBlockContentListingRoutes() { + public static function getBlockContentListingRoutes() { return [ ['entity.block_content.collection', 'system.admin_content'], ]; diff --git a/core/modules/book/tests/src/Kernel/BookMultilingualTest.php b/core/modules/book/tests/src/Kernel/BookMultilingualTest.php index f82473444c7..089bbbc5332 100644 --- a/core/modules/book/tests/src/Kernel/BookMultilingualTest.php +++ b/core/modules/book/tests/src/Kernel/BookMultilingualTest.php @@ -256,7 +256,7 @@ class BookMultilingualTest extends KernelTestBase { /** * Data provider for ::testMultilingualBooks(). */ - public function langcodesProvider() { + public static function langcodesProvider() { return [ [self::LANGCODE], ['en'], diff --git a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php index f4be91f0772..28c989bf355 100644 --- a/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php +++ b/core/modules/book/tests/src/Kernel/Migrate/d6/MigrateBookConfigsTest.php @@ -32,7 +32,7 @@ class MigrateBookConfigsTest extends MigrateDrupal6TestBase { * @return array * The data for each test scenario. */ - public function providerBookSettings() { + public static function providerBookSettings() { return [ // d6_book_settings was renamed to book_settings, but use the old alias to // prove that it works. diff --git a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php index a73f180a85c..d15d673a97c 100644 --- a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php +++ b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/BookTest.php @@ -18,7 +18,7 @@ class BookTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/book/tests/src/Unit/BookManagerTest.php b/core/modules/book/tests/src/Unit/BookManagerTest.php index 945b21f788f..dd39ef8d142 100644 --- a/core/modules/book/tests/src/Unit/BookManagerTest.php +++ b/core/modules/book/tests/src/Unit/BookManagerTest.php @@ -104,7 +104,7 @@ class BookManagerTest extends UnitTestCase { * @return array * The test data. */ - public function providerTestGetBookParents() { + public static function providerTestGetBookParents() { $empty = [ 'p1' => 0, 'p2' => 0, diff --git a/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php b/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php index db1732cb7f4..9138f8ff180 100644 --- a/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php +++ b/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php @@ -39,7 +39,7 @@ class BookLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getBookAdminRoutes() { + public static function getBookAdminRoutes() { return [ ['book.admin'], ['book.settings'], @@ -60,7 +60,7 @@ class BookLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getBookNodeRoutes() { + public static function getBookNodeRoutes() { return [ ['entity.node.canonical'], ['entity.node.book_outline_form'], diff --git a/core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateImageToolbarItemTest.php b/core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateImageToolbarItemTest.php index f481448e35e..5c950c0af96 100644 --- a/core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateImageToolbarItemTest.php +++ b/core/modules/ckeditor5/tests/src/Functional/Update/CKEditor5UpdateImageToolbarItemTest.php @@ -146,7 +146,7 @@ class CKEditor5UpdateImageToolbarItemTest extends UpdatePathTestBase { * @return array * The test cases. */ - public function provider(): array { + public static function provider(): array { // There are 3 aspects that need to be verified, each can be true or false, // making for 8 test cases in total. $test_cases = []; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php index a30b9ce9f65..7eb2894cc95 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php @@ -450,14 +450,14 @@ abstract class ImageTestBase extends CKEditor5TestBase { $this->assertVisibleBalloon('.ck-text-alternative-form'); } - public function providerAltTextRequired(): array { + public static function providerAltTextRequired(): array { return [ 'Restricted' => [FALSE], 'Unrestricted' => [TRUE], ]; } - public function providerLinkability(): array { + public static function providerLinkability(): array { return [ 'BLOCK image, restricted' => ['block', FALSE], 'BLOCK image, unrestricted' => ['block', TRUE], @@ -528,7 +528,7 @@ abstract class ImageTestBase extends CKEditor5TestBase { $this->assertFalse($drupal_media_element->hasAttribute('data-align')); } - public function providerAlignment() { + public static function providerAlignment() { return [ 'Block image' => ['block'], 'Inline image' => ['inline'], @@ -620,7 +620,7 @@ abstract class ImageTestBase extends CKEditor5TestBase { * * @return string[][] */ - public function providerWidth(): array { + public static function providerWidth(): array { return [ 'Image resize with percent unit (only allowed in HTML 4)' => [ 'width' => '33%', @@ -674,7 +674,7 @@ abstract class ImageTestBase extends CKEditor5TestBase { * @return array * The test cases. */ - public function providerResize(): array { + public static function providerResize(): array { return [ 'Image resize is enabled' => [ 'is_resize_enabled' => TRUE, diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php index 4a89ab10380..4b3f570cd48 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php @@ -82,7 +82,7 @@ JS; * * @return string[][] */ - public function provider(): array { + public static function provider(): array { return [ 'Language code both in Drupal and CKEditor' => [ 'langcode' => 'th', diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php index 9d953723781..209b1de962c 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php @@ -221,7 +221,7 @@ class MediaLinkabilityTest extends MediaTestBase { $this->assertEmpty($xpath->query('//a')); } - public function providerLinkability(): array { + public static function providerLinkability(): array { return [ 'restricted' => [FALSE], 'unrestricted' => [TRUE], diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php index ac88edb64c3..59cbf7f3074 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php @@ -186,7 +186,7 @@ class MediaPreviewTest extends MediaTestBase { /** * Data provider for ::testEmbedPreviewAccess. */ - public function previewAccessProvider() { + public static function previewAccessProvider() { return [ 'media_embed filter enabled' => [ TRUE, diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index 255c264c637..ebbf600ed80 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -1007,7 +1007,7 @@ class MediaTest extends MediaTestBase { /** * For testing view modes in different scenarios. */ - public function providerTestViewMode(): array { + public static function providerTestViewMode(): array { return [ 'with alignment' => [TRUE], 'without alignment' => [FALSE], diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php index a638d567659..b7c1af2d051 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -118,7 +118,7 @@ JS; * @return array * The test cases. */ - public function providerAllowingExtraAttributes(): array { + public static function providerAllowingExtraAttributes(): array { $general_test_case_markup = '<div class="llama" data-llama="🦙"><p data-llama="🦙">The <a href="https://example.com/pirate" class="button" data-grammar="subject">pirate</a> is <a href="https://example.com/irate" class="use-ajax" data-grammar="adjective">irate</a>.</p></div>'; return [ 'no extra attributes allowed' => [ diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php index 469e582d244..1ae537c185b 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php @@ -201,7 +201,7 @@ YAML, * @return \Generator * Test scenarios. */ - public function providerTestInvalidPluginDefinitions(): \Generator { + public static function providerTestInvalidPluginDefinitions(): \Generator { yield 'invalid plugin ID with everything else okay' => [ <<<YAML foo_bar: @@ -1282,7 +1282,7 @@ PHP, /** * Provides uses cases enabling different elements and the expected results. */ - public function providerTestProvidedElements(): array { + public static function providerTestProvidedElements(): array { $text_align_classes = [ 'text-align-left' => TRUE, 'text-align-center' => TRUE, @@ -1507,7 +1507,7 @@ PHP, /** * Provides use cases for findPluginSupportingElement(). */ - public function providerTestPluginSupportingElement() { + public static function providerTestPluginSupportingElement() { return [ 'tag that belongs to a superset' => [ 'tag' => 'h2', diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php index 7883277e976..248e2671988 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5StylesheetsTest.php @@ -46,7 +46,7 @@ class CKEditor5StylesheetsTest extends KernelTestBase { * @return array * An array of test cases. */ - public function externalStylesheetsProvider() { + public static function externalStylesheetsProvider() { return [ 'Install theme which has an absolute external CSS URL' => [ 'test_ckeditor_stylesheets_external', diff --git a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php index 99235f7264e..d5f50e4a98a 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php @@ -649,7 +649,7 @@ class SmartDefaultSettingsTest extends KernelTestBase { * @return \Generator * Test scenarios. */ - public function provider() { + public static function provider() { $basic_html_test_case = [ 'format_id' => 'basic_html', 'filters_to_drop' => [], diff --git a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php index adacf4d2c08..bb18c3cef65 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php @@ -110,7 +110,7 @@ class ValidatorsTest extends KernelTestBase { /** * Provides a list of Text Editor config entities using CKEditor 5 to test. */ - public function provider(): array { + public static function provider(): array { $data = []; $data['CKEditor5::getDefaultSettings()'] = [ // @see ::test() @@ -703,7 +703,7 @@ class ValidatorsTest extends KernelTestBase { /** * Provides a list of Text Editor + Text Format pairs to test. */ - public function providerPair(): array { + public static function providerPair(): array { // cspell:ignore donk $data = []; $data['INVALID: allow_view_mode_override condition not met: filter must be configured to allow 2 or more view modes'] = [ diff --git a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php index 9a3023738a7..725ed1f66a2 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php @@ -99,7 +99,7 @@ class WildcardHtmlSupportTest extends KernelTestBase { $this->assertEquals($expected_ghs_configuration, $ghs_configuration); } - public function providerGhsConfiguration(): array { + public static function providerGhsConfiguration(): array { return [ 'empty source editing' => [ '<p> <br>', diff --git a/core/modules/ckeditor5/tests/src/Unit/AlignmentPluginTest.php b/core/modules/ckeditor5/tests/src/Unit/AlignmentPluginTest.php index 6e3ef192a32..904fca1bc49 100644 --- a/core/modules/ckeditor5/tests/src/Unit/AlignmentPluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/AlignmentPluginTest.php @@ -19,7 +19,7 @@ class AlignmentPluginTest extends UnitTestCase { /** * Provides a list of configs to test. */ - public function providerGetDynamicPluginConfig(): array { + public static function providerGetDynamicPluginConfig(): array { return [ 'All alignments' => [ Alignment::DEFAULT_CONFIGURATION, diff --git a/core/modules/ckeditor5/tests/src/Unit/CKEditor5Test.php b/core/modules/ckeditor5/tests/src/Unit/CKEditor5Test.php index 7b85d9becf1..7a202abfc2f 100644 --- a/core/modules/ckeditor5/tests/src/Unit/CKEditor5Test.php +++ b/core/modules/ckeditor5/tests/src/Unit/CKEditor5Test.php @@ -62,7 +62,7 @@ class CKEditor5Test extends UnitTestCase { * @return array[] * An array with the property path and expected form item name. */ - public function providerPathsToFormNames(): array { + public static function providerPathsToFormNames(): array { return [ 'validation error targeting toolbar items' => [ 'settings.toolbar.items', diff --git a/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php b/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php index a923d34f890..3452689dfbc 100644 --- a/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php @@ -27,7 +27,7 @@ class HTMLRestrictionsTest extends UnitTestCase { new HTMLRestrictions($elements); } - public function providerConstruct(): \Generator { + public static function providerConstruct(): \Generator { // Fundamental structure. yield 'INVALID: list instead of key-value pairs' => [ ['<foo>', '<bar>'], @@ -166,7 +166,7 @@ class HTMLRestrictionsTest extends UnitTestCase { $this->assertCount($expected_concrete_plus_wildcard_count, $r->getAllowedElements(FALSE)); } - public function providerCounting(): \Generator { + public static function providerCounting(): \Generator { yield 'empty' => [ [], TRUE, @@ -256,7 +256,7 @@ class HTMLRestrictionsTest extends UnitTestCase { $this->assertSame($expected_raw + $filter_html_additional_expectations, HTMLRestrictions::fromFilterPluginInstance($filter_plugin_instance->reveal())->getAllowedElements(FALSE)); } - public function providerConvenienceConstructors(): \Generator { + public static function providerConvenienceConstructors(): \Generator { // All empty cases. yield 'empty string' => [ '', @@ -638,7 +638,7 @@ class HTMLRestrictionsTest extends UnitTestCase { $this->assertSame($expected_ghs_config, $restrictions->toGeneralHtmlSupportConfig()); } - public function providerRepresentations(): \Generator { + public static function providerRepresentations(): \Generator { yield 'empty set' => [ HTMLRestrictions::emptySet(), [], @@ -904,7 +904,7 @@ class HTMLRestrictionsTest extends UnitTestCase { $this->assertEquals($expected_union, $a->merge($b)); } - public function providerOperands(): \Generator { + public static function providerOperands(): \Generator { // Empty set operand cases. yield 'any set + empty set' => [ 'a' => new HTMLRestrictions(['a' => ['href' => TRUE]]), @@ -1504,7 +1504,7 @@ class HTMLRestrictionsTest extends UnitTestCase { $this->assertEquals($expected_extracted_plain_tags_subset, $input->extractPlainTagsSubset()); } - public function providerSubsets(): \Generator { + public static function providerSubsets(): \Generator { yield 'empty set' => [ new HTMLRestrictions([]), new HTMLRestrictions([]), diff --git a/core/modules/ckeditor5/tests/src/Unit/HeadingPluginTest.php b/core/modules/ckeditor5/tests/src/Unit/HeadingPluginTest.php index bd20e30d9f1..f6515c637a1 100644 --- a/core/modules/ckeditor5/tests/src/Unit/HeadingPluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/HeadingPluginTest.php @@ -19,7 +19,7 @@ class HeadingPluginTest extends UnitTestCase { /** * Provides a list of configs to test. */ - public function providerGetDynamicPluginConfig(): array { + public static function providerGetDynamicPluginConfig(): array { // Prepare headings matching ckeditor5.ckeditor5.yml to also protect // against unexpected changes to the YAML file given the YAML file is used // to generate the dynamic plugin configuration. diff --git a/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php b/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php index 1173e417fb3..1efae1f5b7f 100644 --- a/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php @@ -19,7 +19,7 @@ class ListPluginTest extends UnitTestCase { /** * Provides a list of configs to test. */ - public function providerGetDynamicPluginConfig(): array { + public static function providerGetDynamicPluginConfig(): array { return [ 'startIndex is false' => [ [ diff --git a/core/modules/ckeditor5/tests/src/Unit/SmartDefaultSettingsTest.php b/core/modules/ckeditor5/tests/src/Unit/SmartDefaultSettingsTest.php index f590ef6311a..ebeb5a12147 100644 --- a/core/modules/ckeditor5/tests/src/Unit/SmartDefaultSettingsTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/SmartDefaultSettingsTest.php @@ -34,7 +34,7 @@ class SmartDefaultSettingsTest extends UnitTestCase { * * @return \Generator */ - public function providerSurplusScore(): \Generator { + public static function providerSurplusScore(): \Generator { $needed = new HTMLRestrictions(['code' => FALSE]); yield 'surplus: 1 tag, 1 attribute, 1 attribute with wildcard restriction' => [ @@ -92,7 +92,7 @@ class SmartDefaultSettingsTest extends UnitTestCase { * * @return \Generator */ - public function providerCandidates(): \Generator { + public static function providerCandidates(): \Generator { $generate_definition = function (string $label_and_id, array $overrides): CKEditor5PluginDefinition { $annotation = [ 'provider' => 'test', diff --git a/core/modules/ckeditor5/tests/src/Unit/SourceEditingPluginTest.php b/core/modules/ckeditor5/tests/src/Unit/SourceEditingPluginTest.php index 13060bd98a8..b32146fba10 100644 --- a/core/modules/ckeditor5/tests/src/Unit/SourceEditingPluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/SourceEditingPluginTest.php @@ -18,7 +18,7 @@ class SourceEditingPluginTest extends UnitTestCase { /** * Provides a list of configs to test. */ - public function providerGetDynamicPluginConfig(): array { + public static function providerGetDynamicPluginConfig(): array { return [ 'Empty array of allowed tags' => [ [ diff --git a/core/modules/ckeditor5/tests/src/Unit/StylePluginTest.php b/core/modules/ckeditor5/tests/src/Unit/StylePluginTest.php index 1418467d8dd..6ca265b51ec 100644 --- a/core/modules/ckeditor5/tests/src/Unit/StylePluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/StylePluginTest.php @@ -18,7 +18,7 @@ class StylePluginTest extends UnitTestCase { /** * Provides a list of configs to test. */ - public function providerGetDynamicPluginConfig(): array { + public static function providerGetDynamicPluginConfig(): array { return [ 'default configuration (empty)' => [ [ diff --git a/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php b/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php index 73fdf4e8039..492eb6ffc9c 100644 --- a/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php @@ -124,7 +124,7 @@ class CommentOrphanTest extends EntityKernelTestBase { /** * Provides test data for testOrphan. */ - public function providerTestOrphan() { + public static function providerTestOrphan() { return [ ['entity_id'], ['uid'], diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php index 084a8e1005d..8d53bee41ba 100644 --- a/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php @@ -113,7 +113,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase { /** * Provides test cases for ::testNoCommentTypeMigration(). */ - public function providerTestNoCommentTypeMigration() { + public static function providerTestNoCommentTypeMigration() { return [ 'Node module is disabled in source' => [ 'Disabled source modules' => ['node'], diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php index ff780ae89af..217427c6215 100644 --- a/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/CommentEntityTranslationCheckRequirementsTest.php @@ -46,7 +46,7 @@ class CommentEntityTranslationCheckRequirementsTest extends MigrateDrupal7TestBa * * @return string[][] */ - public function providerTestCheckRequirements() { + public static function providerTestCheckRequirements() { return [ ['comment'], ['node'], diff --git a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php index 770464d971f..2a82104ed5c 100644 --- a/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php +++ b/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php @@ -119,7 +119,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase { /** * Provides test cases for ::testNoCommentTypeMigration(). */ - public function providerTestNoCommentTypeMigration() { + public static function providerTestNoCommentTypeMigration() { return [ 'Node module is disabled in source' => [ 'Disabled source modules' => ['node'], diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php index 7a09ad3cf8e..03a9b7ed536 100644 --- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php +++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeRequirementsTest.php @@ -47,7 +47,7 @@ class CommentTypeRequirementsTest extends MigrateDrupal7TestBase { /** * Test cases for ::testCheckCommentTypeRequirements(). */ - public function providerTestCheckCommentTypeRequirements() { + public static function providerTestCheckCommentTypeRequirements() { return [ 'D6 comment is disabled on source' => [ 'Disabled source modules' => ['comment'], diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeTest.php index 91d1bfb41c0..f838a575a5b 100644 --- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeTest.php +++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/CommentTypeTest.php @@ -21,7 +21,7 @@ class CommentTypeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $node_type_rows = [ [ 'type' => 'page', diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php index 7370609aa24..69a932f3611 100644 --- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php +++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentSourceWithHighWaterTest.php @@ -21,7 +21,7 @@ class CommentSourceWithHighWaterTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php index 76f6ac2a341..38191327f65 100644 --- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php +++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d6/CommentTest.php @@ -20,7 +20,7 @@ class CommentTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php index 800929388fe..8823e90ff9d 100644 --- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php +++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentEntityTranslationTest.php @@ -22,7 +22,7 @@ class CommentEntityTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php index ad8f5902931..cca51f2797f 100644 --- a/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php +++ b/core/modules/comment/tests/src/Kernel/Plugin/migrate/source/d7/CommentTest.php @@ -22,7 +22,7 @@ class CommentTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php b/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php index 496b57fbfbc..753f949776d 100644 --- a/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php +++ b/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php @@ -33,7 +33,7 @@ class ConfigLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getConfigAdminRoutes() { + public static function getConfigAdminRoutes() { return [ ['config.sync', [['config.sync', 'config.import', 'config.export']]], ['config.import_full', [['config.sync', 'config.import', 'config.export'], ['config.import_full', 'config.import_single']]], diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php index 22dd4150f33..233fd4c4c7b 100644 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php @@ -22,7 +22,7 @@ class ProfileFieldTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; $test[0]['source_data'] = [ 'profile_fields' => [ diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php index 23a13bed5f9..2eaa4a14d72 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php @@ -523,7 +523,7 @@ class ConfigNamesMapperTest extends UnitTestCase { * hasConfigSchema() as the first value and the expected return value of * ConfigNamesMapper::hasSchema() as the second value. */ - public function providerTestHasSchema() { + public static function providerTestHasSchema() { return [ [[TRUE], TRUE], [[FALSE], FALSE], @@ -570,7 +570,7 @@ class ConfigNamesMapperTest extends UnitTestCase { * hasTranslatable() as the first value and the expected return value of * ConfigNamesMapper::hasTranslatable() as the second value. */ - public function providerTestHasTranslatable() { + public static function providerTestHasTranslatable() { return [ [[], FALSE], [[TRUE], TRUE], @@ -621,7 +621,7 @@ class ConfigNamesMapperTest extends UnitTestCase { * hasTranslation() as the first value and the expected return value of * ConfigNamesMapper::hasTranslation() as the second value. */ - public function providerTestHasTranslation() { + public static function providerTestHasTranslation() { return [ [[TRUE], TRUE], [[FALSE], FALSE], diff --git a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php index 1ea9b337f23..c8f6fa86d3a 100644 --- a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php +++ b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/ContactCategoryTest.php @@ -20,7 +20,7 @@ class ContactCategoryTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php index 9c7952f74ef..18bdc577b44 100644 --- a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php +++ b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php @@ -20,7 +20,7 @@ class ContactSettingsTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['variable'] = [ diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php index c678595ab69..6efd560f2c8 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php @@ -102,7 +102,7 @@ class ModerationActionsTest extends BrowserTestBase { * @return array * An array of test cases. */ - public function nodeStatusActionsTestCases() { + public static function nodeStatusActionsTestCases() { return [ 'Moderated bundle shows warning (publish action)' => [ 'node_publish_action', diff --git a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php index cdaae0d2e41..97554b4427d 100644 --- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php @@ -261,7 +261,7 @@ class ViewsModerationStateFilterTest extends ViewTestBase { * @return string[] * An array of view IDs. */ - public function providerTestWorkflowChanges() { + public static function providerTestWorkflowChanges() { return [ 'view on base table, filter on base table' => [ 'test_content_moderation_state_filter_base_table', diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php index 8498d8d9766..e26ddcf5348 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php @@ -48,7 +48,7 @@ class ContentModerationPermissionsTest extends KernelTestBase { * @return array * Content moderation permissions based test cases. */ - public function permissionsTestCases() { + public static function permissionsTestCases() { return [ 'Simple Content Moderation Workflow' => [ [ diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index 6317a1f4ec5..0a9b692f023 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -169,7 +169,7 @@ class ContentModerationStateTest extends KernelTestBase { /** * Test cases for basic moderation test. */ - public function basicModerationTestCases() { + public static function basicModerationTestCases() { return [ 'Nodes' => [ 'node', @@ -480,7 +480,7 @@ class ContentModerationStateTest extends KernelTestBase { /** * Test cases for ::testModerationWithSpecialLanguages(). */ - public function moderationWithSpecialLanguagesTestCases() { + public static function moderationWithSpecialLanguagesTestCases() { return [ 'Not specified to not specified' => [ LanguageInterface::LANGCODE_NOT_SPECIFIED, diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php index f2e74d74307..80ebf288c21 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityStateChangeValidationTest.php @@ -364,7 +364,7 @@ class EntityStateChangeValidationTest extends KernelTestBase { /** * Test cases for ::testTransitionAccessValidation. */ - public function transitionAccessValidationTestCases() { + public static function transitionAccessValidationTestCases() { return [ 'Invalid transition, no permissions validated' => [ [], diff --git a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php index 6090269ac3a..377908fff29 100644 --- a/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/EntityTypeInfoTest.php @@ -98,7 +98,7 @@ class EntityTypeInfoTest extends KernelTestBase { * - An entity type ID. * - Whether the entity type is moderatable or not. */ - public function providerTestEntityTypeAlter() { + public static function providerTestEntityTypeAlter() { $tests = []; $tests['non_internal_non_revisionable'] = ['entity_test', FALSE]; $tests['non_internal_revisionable'] = ['entity_test_rev', TRUE]; diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php index 786e2b8924d..b2b708594a2 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php @@ -97,7 +97,7 @@ class ModerationInformationTest extends KernelTestBase { /** * Test cases for ::testIsDefaultRevisionPublished. */ - public function isDefaultRevisionPublishedTestCases() { + public static function isDefaultRevisionPublishedTestCases() { return [ 'Draft to draft' => [ 'draft', diff --git a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php index 25a32002e8b..ac93ad291f9 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php @@ -213,7 +213,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase { /** * Data provider for ::testModerationStateChanges. */ - public function moderationStateChangesTestCases() { + public static function moderationStateChangesTestCases() { return [ 'Draft to draft' => [ 'draft', @@ -298,7 +298,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase { /** * Test cases for ::testEntityUnserialize. */ - public function entityUnserializeTestCases() { + public static function entityUnserializeTestCases() { return [ 'Default draft state' => [ 'draft', @@ -332,7 +332,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase { /** * Tests cases for ::testModeratedEntityWithExistingId. */ - public function moderatedEntityWithExistingIdTestCases() { + public static function moderatedEntityWithExistingIdTestCases() { return [ 'Draft non-default state' => [ 'draft', diff --git a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php index 240af223463..d8bc629e43f 100644 --- a/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php @@ -64,7 +64,7 @@ class StateFormatterTest extends KernelTestBase { /** * Test cases for testStateFieldFormatter(). */ - public function formatterTestCases() { + public static function formatterTestCases() { return [ 'Draft State' => [ 'draft', diff --git a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php index 9f9776682e5..9e4b59a3097 100644 --- a/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php @@ -155,7 +155,7 @@ class WorkspacesContentModerationStateTest extends ContentModerationStateTest { /** * Test cases for basic moderation test. */ - public function basicModerationTestCases() { + public static function basicModerationTestCases() { return [ 'Nodes' => [ 'node', diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php index 10970b44847..1c1a942d18a 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php @@ -69,7 +69,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { /** * Data provider for ::testSetLatestRevisionFlag. */ - public function setLatestRevisionFlagTestCases() { + public static function setLatestRevisionFlagTestCases() { return [ 'Entity parameter not on an entity form' => [ [], diff --git a/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php b/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php index 0a12971d0df..7c8071b46e0 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentPreprocessTest.php @@ -29,7 +29,7 @@ class ContentPreprocessTest extends UnitTestCase { /** * Data provider for self::testIsLatestVersionPage(). */ - public function routeNodeProvider() { + public static function routeNodeProvider() { return [ ['entity.node.canonical', 1, 1, FALSE, 'Not on the latest version tab route.'], ['entity.node.latest_version', 1, 1, TRUE, 'On the latest version tab route, with the route node.'], diff --git a/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php b/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php index c384425e3e5..3f094dc0700 100644 --- a/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php +++ b/core/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php @@ -105,7 +105,7 @@ class LatestRevisionCheckTest extends UnitTestCase { /** * Data provider for testLastAccessPermissions(). */ - public function accessSituationProvider() { + public static function accessSituationProvider() { return [ // Node with global permissions and latest version. [Node::class, 'node', TRUE, ['view latest version', 'view any unpublished content'], FALSE, AccessResultAllowed::class], diff --git a/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php b/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php index 0d92309af9a..f35b3b7f29e 100644 --- a/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php @@ -146,7 +146,7 @@ class ModerationInformationTest extends UnitTestCase { /** * Data provider for several tests. */ - public function providerWorkflow() { + public static function providerWorkflow() { return [ [NULL, FALSE], ['workflow', TRUE], diff --git a/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php b/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php index bb314149759..b2aaaeee782 100644 --- a/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php +++ b/core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php @@ -98,7 +98,7 @@ class StateTransitionValidationTest extends UnitTestCase { /** * Data provider for the user transition test. */ - public function userTransitionsProvider() { + public static function userTransitionsProvider() { // The user has the right permission, so let it through. $ret[] = ['draft', 'draft', 'use process transition draft', TRUE, TRUE]; diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php index 7d27abd9585..000825ebdf5 100644 --- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationHandlerTest.php @@ -134,7 +134,7 @@ class ContentTranslationHandlerTest extends KernelTestBase { * An array of test cases, each one containing the element to alter, the * form state, and the expected altered element. */ - public function providerTestEntityFormSharedElements() { + public static function providerTestEntityFormSharedElements() { $tests = []; $element = []; diff --git a/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php index 7a25bf599da..50c7e84e5eb 100644 --- a/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php +++ b/core/modules/content_translation/tests/src/Kernel/Plugin/migrate/source/d7/EntityTranslationSettingsTest.php @@ -25,7 +25,7 @@ class EntityTranslationSettingsTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // Source data when there's no entity type that uses entity translation. diff --git a/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php b/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php index a21d03fb576..be57e9eb445 100644 --- a/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php +++ b/core/modules/content_translation/tests/src/Unit/Menu/ContentTranslationLocalTasksTest.php @@ -55,7 +55,7 @@ class ContentTranslationLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function providerTestBlockAdminDisplay() { + public static function providerTestBlockAdminDisplay() { return [ [ 'entity.node.canonical', diff --git a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php index dc6cd8ef0fd..418219627d2 100644 --- a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php +++ b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php @@ -26,7 +26,7 @@ class ContextualUnitTest extends KernelTestBase { * @return array[] * Test cases. */ - public function contextualLinksDataProvider(): array { + public static function contextualLinksDataProvider(): array { $tests['one group, one dynamic path argument, no metadata'] = [ [ 'node' => [ diff --git a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php index 5119e78b88b..159b6679743 100644 --- a/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php +++ b/core/modules/datetime/tests/src/Kernel/DateTimeItemTest.php @@ -272,7 +272,7 @@ class DateTimeItemTest extends FieldKernelTestBase { /** * Provider for testDatetimeValidation(). */ - public function datetimeValidationProvider() { + public static function datetimeValidationProvider() { return [ // Valid ISO 8601 dates, but unsupported by DateTimeItem. ['2014-01-01T20:00:00Z'], @@ -332,7 +332,7 @@ class DateTimeItemTest extends FieldKernelTestBase { /** * Provider for testDatetimeValidation(). */ - public function dateOnlyValidationProvider() { + public static function dateOnlyValidationProvider() { return [ // Valid date strings, but unsupported by DateTimeItem. ['Thu, 03 Nov 2014'], diff --git a/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php index b5dc4b4f42b..54833c37548 100644 --- a/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php +++ b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php @@ -66,7 +66,7 @@ class DateFieldTest extends UnitTestCase { /** * Provides data for testDefineValueProcessPipeline(). */ - public function providerTestDefineValueProcessPipeline() { + public static function providerTestDefineValueProcessPipeline() { return [ [['type' => 'date'], 'Y-m-d\TH:i:s', 'Y-m-d\TH:i:s'], [['type' => 'datestamp'], 'U', 'U'], diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php index ec4c927676d..c0d1d0f403e 100644 --- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php +++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php @@ -58,7 +58,7 @@ class StandardTest extends UnitTestCase { * * @see \Drupal\Tests\editor\Unit\editor\EditorXssFilter\StandardTest::testFilterXss() */ - public function providerTestFilterXss() { + public static function providerTestFilterXss() { $data = []; $data[] = ['<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>', '<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>']; $data[] = ['<p style="color:red">Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>', '<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>']; @@ -580,7 +580,7 @@ xss:ex/*XSS*//*/*/pression(alert("XSS"))\'>', * - The assertion message. * - (optional) The disallowed HTML tags to be passed to \Drupal\Component\Utility\Xss::filter(). */ - public function providerTestBlackListMode() { + public static function providerTestBlackListMode() { return [ [ '<unknown style="visibility:hidden">Pink Fairy Armadillo</unknown><video src="gerenuk.mp4"><script>alert(0)</script>', diff --git a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php index 6d5f6b4a58a..0ccef5319f8 100644 --- a/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php +++ b/core/modules/field/tests/src/Kernel/Number/NumberItemTest.php @@ -167,7 +167,7 @@ class NumberItemTest extends FieldKernelTestBase { * @return \Generator * The test data. */ - public function dataNumberFieldSettingsProvider() { + public static function dataNumberFieldSettingsProvider() { yield ['integer', NULL, NULL, -100, FALSE]; yield ['integer', 0, NULL, -100, TRUE, 'field_integer: the value may be no less than 0.']; yield ['integer', 10, NULL, 100, FALSE]; @@ -243,7 +243,7 @@ class NumberItemTest extends FieldKernelTestBase { * @return \Generator * The test data. */ - public function dataTestMinMaxValue() { + public static function dataTestMinMaxValue() { yield [1, 10, 5, FALSE, '']; yield [10, 5, 6, TRUE, 'The minimum value must be less than or equal to 5.']; yield [1, 0, 6, TRUE, 'The minimum value must be less than or equal to 0.']; diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php index d718f11a5b2..9efb332628a 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php @@ -26,7 +26,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; // The source data. diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php index 3ec153949a4..8abca1b4bc4 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php @@ -18,7 +18,7 @@ class FieldInstanceOptionTranslationTest extends FieldOptionTranslationTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = parent::providerSource(); // FieldInstanceOptionTranslation extends FieldOptionTranslation so the diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php index 59900135c2d..563619d937b 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php @@ -22,7 +22,7 @@ class FieldInstancePerFormDisplayTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php index e46d00b15c1..6b0e91b80e3 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php @@ -20,7 +20,7 @@ class FieldInstancePerViewModeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php index 2fd757f771a..71c17a21d61 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php @@ -20,7 +20,7 @@ class FieldInstanceTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php index 74f8b92ffdd..fc52d119c55 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php @@ -22,7 +22,7 @@ class FieldOptionTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; // The source data. diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php index e83d05e7c43..97fbdf55744 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php @@ -20,7 +20,7 @@ class FieldTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php index 8737c4e7469..a1e22b91ba6 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php @@ -26,7 +26,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; // The source data. diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php index 0482ce8afdb..d44d6cd412f 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php @@ -20,7 +20,7 @@ class FieldInstancePerFormDisplayTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php index 64c7d50ad9f..d748f95a9a5 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php @@ -20,7 +20,7 @@ class FieldInstancePerViewModeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php index 8cd03166031..bbbe5a5f249 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php @@ -20,7 +20,7 @@ class FieldInstanceTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php index d317ae7e54d..3b13e449415 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php @@ -22,7 +22,7 @@ class FieldOptionTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; // The source data. diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php index ee3478f3caf..839312bf057 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php @@ -20,7 +20,7 @@ class FieldTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php index 15f6a4c5219..a1fde03c4f9 100644 --- a/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php +++ b/core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/ViewModeTest.php @@ -20,7 +20,7 @@ class ViewModeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php index 9cec8d16d89..937d0881090 100644 --- a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php +++ b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php @@ -202,7 +202,7 @@ class FieldStorageConfigEntityUnitTest extends UnitTestCase { * @return array * Test cases. */ - public function providerInvalidEnforcedCardinality() { + public static function providerInvalidEnforcedCardinality() { return [ 'zero' => [0], 'negative_other_than_-1' => [-70], diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php index 4cf3a3fb4c7..1014e9f056c 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php @@ -111,7 +111,7 @@ class ProcessFieldTest extends MigrateTestCase { * - The MigrateException message to expect. * - Whether the field plugin is not found. */ - public function providerTestTransform() { + public static function providerTestTransform() { return [ // Tests the getFieldType() method. [ diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php index e72ddecdbae..06fa3e8f211 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php @@ -44,7 +44,7 @@ class FieldInstanceSettingsTest extends UnitTestCase { /** * Provides field settings for testGetSettings(). */ - public function getSettingsProvider() { + public static function getSettingsProvider() { return [ 'imagefield size set' => [ 'imagefield_widget', diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php index 657cfb32730..d8307276d19 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php @@ -37,7 +37,7 @@ class FieldSettingsTest extends UnitTestCase { /** * Provides field settings for testGetSettings(). */ - public function getSettingsProvider() { + public static function getSettingsProvider() { return [ [ 'list_integer', diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php index 82ae6a6ded7..00b76df65fc 100644 --- a/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php +++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsMultipleTypesTest.php @@ -138,7 +138,7 @@ class ManageFieldsMultipleTypesTest extends ManageFieldsFunctionalTestBase { * @return array * Test cases. */ - public function entityTypesProvider() { + public static function entityTypesProvider() { return [ 'node' => [ 'entity_type' => 'node', diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php index a915f5da15c..0c640f1215c 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php @@ -143,7 +143,7 @@ class DisplayModeBundleSelectionTest extends WebDriverTestBase { /** * Data provider for testBundleSelection(). */ - public function providerBundleSelection() { + public static function providerBundleSelection() { return [ 'view display' => ['view', 'display', 'full'], 'form display' => ['form', 'form-display', 'foobar'], diff --git a/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php b/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php index e9c3a14a316..caef52e9618 100644 --- a/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php +++ b/core/modules/field_ui/tests/src/Unit/FieldConfigEditFormTest.php @@ -52,7 +52,7 @@ class FieldConfigEditFormTest extends UnitTestCase { /** * Provides test cases with required and optional elements. */ - public function providerRequired(): \Generator { + public static function providerRequired(): \Generator { yield 'required' => [ [['#required' => TRUE]], TRUE, diff --git a/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php b/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php index 8ba2415b13e..88b4c4da2fa 100644 --- a/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php +++ b/core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php @@ -25,7 +25,7 @@ class FieldUiTableTest extends UnitTestCase { /** * Provides test data for testReduceOrder(). */ - public function providerTestReduceOrder() { + public static function providerTestReduceOrder() { return [ 'Flat' => [ 'array' => [ diff --git a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php index 300658f7033..83b2efd5488 100644 --- a/core/modules/file/tests/src/Kernel/FileItemValidationTest.php +++ b/core/modules/file/tests/src/Kernel/FileItemValidationTest.php @@ -128,7 +128,7 @@ class FileItemValidationTest extends KernelTestBase { /** * Provides a list of file types to test. */ - public function getFileTypes() { + public static function getFileTypes() { return [['file'], ['image']]; } diff --git a/core/modules/file/tests/src/Kernel/LegacyValidatorTest.php b/core/modules/file/tests/src/Kernel/LegacyValidatorTest.php index 150438c41f2..357dcb357eb 100644 --- a/core/modules/file/tests/src/Kernel/LegacyValidatorTest.php +++ b/core/modules/file/tests/src/Kernel/LegacyValidatorTest.php @@ -85,7 +85,7 @@ class LegacyValidatorTest extends FileManagedUnitTestBase { * @return array[][] * The test cases. */ - public function providerTestFileValidateExtensionsOnUri(): array { + public static function providerTestFileValidateExtensionsOnUri(): array { $temporary_txt_file_properties = [ 'filename' => 'asdf.txt', 'uri' => 'temporary://asdf', diff --git a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php index 7ca2ed03977..9347eb7f529 100644 --- a/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php +++ b/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileExtensionConstraintValidatorTest.php @@ -50,7 +50,7 @@ class FileExtensionConstraintValidatorTest extends FileValidatorTestBase { * @return array[][] * The test cases. */ - public function providerTestFileValidateExtensionsOnUri(): array { + public static function providerTestFileValidateExtensionsOnUri(): array { $temporary_txt_file_properties = [ 'filename' => 'asdf.txt', 'uri' => 'temporary://asdf', diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php index f316f9035e1..17619243a6a 100644 --- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php +++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/FileTest.php @@ -21,7 +21,7 @@ class FileTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php index b9976ebbc4f..ae7548607ff 100644 --- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php +++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php @@ -23,7 +23,7 @@ class UploadInstanceTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php index ac41f4e2437..b6f5ded201f 100644 --- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php +++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php @@ -23,7 +23,7 @@ class UploadTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php index 50b4d346d95..9a955d56e51 100644 --- a/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php +++ b/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php @@ -20,7 +20,7 @@ class FileTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['file_managed'] = [ diff --git a/core/modules/file/tests/src/Kernel/Validation/UploadedFileValidatorTest.php b/core/modules/file/tests/src/Kernel/Validation/UploadedFileValidatorTest.php index 78e2716bbfc..45b1dbb7271 100644 --- a/core/modules/file/tests/src/Kernel/Validation/UploadedFileValidatorTest.php +++ b/core/modules/file/tests/src/Kernel/Validation/UploadedFileValidatorTest.php @@ -103,7 +103,7 @@ class UploadedFileValidatorTest extends KernelTestBase { /** * Data provider for ::testValidateFail. */ - public function validateProvider(): array { + public static function validateProvider(): array { return [ 'ini size' => [ \UPLOAD_ERR_INI_SIZE, diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php index 2e8e046dc55..0e9017cab23 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php @@ -65,7 +65,7 @@ class FileFieldTest extends UnitTestCase { /** * Data provider for testGetFieldType(). */ - public function getFieldTypeProvider() { + public static function getFieldTypeProvider() { return [ ['image', 'imagefield_widget'], ['file', 'filefield_widget'], diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php index 10b3297c07c..df8fc52a13c 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php @@ -70,7 +70,7 @@ class FileFieldTest extends UnitTestCase { /** * Data provider for testGetFieldType(). */ - public function getFieldTypeProvider() { + public static function getFieldTypeProvider() { return [ ['image', 'imagefield_widget'], ['file', 'filefield_widget'], diff --git a/core/modules/file/tests/src/Unit/SanitizeNameTest.php b/core/modules/file/tests/src/Unit/SanitizeNameTest.php index 33b544f7bba..a2c4d7e55da 100644 --- a/core/modules/file/tests/src/Unit/SanitizeNameTest.php +++ b/core/modules/file/tests/src/Unit/SanitizeNameTest.php @@ -76,7 +76,7 @@ class SanitizeNameTest extends UnitTestCase { * @return array * Arrays with original name, expected name, and sanitization options. */ - public function provideFilenames() { + public static function provideFilenames() { return [ 'Test default options' => [ 'TÉXT-œ.txt', diff --git a/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php b/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php index 2d3545306b8..237e470768e 100644 --- a/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php +++ b/core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php @@ -62,7 +62,7 @@ class ContentDispositionFilenameParserTest extends UnitTestCase { /** * A data provider for invalid headers. */ - public function invalidHeaderProvider(): array { + public static function invalidHeaderProvider(): array { return [ 'multiple' => ['file; filename=""'], 'empty' => ['filename=""'], diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php index 49e54a859c6..04dfe6818fa 100644 --- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php +++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterIdTest.php @@ -101,7 +101,7 @@ class FilterIdTest extends KernelTestBase { * When $invalid_id is provided the transformation should fail with the * supplied id. */ - public function provideFilters() { + public static function provideFilters() { return [ 'filter ID mapped to plugin that exists' => [ 'foo', diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php index 51592ee8b98..f9854b24cc8 100644 --- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php +++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/process/FilterSettingsTest.php @@ -44,7 +44,7 @@ class FilterSettingsTest extends MigrateTestCase { * * @return array */ - public function dataProvider() { + public static function dataProvider() { return [ // Tests that the transformed value is identical to the input value when // destination is not the filter_html. diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php index 18448d1f6e3..7e64934c0cc 100644 --- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php +++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d6/FilterFormatTest.php @@ -21,7 +21,7 @@ class FilterFormatTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php index d2a2d48b5fb..466a8a7da97 100644 --- a/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php +++ b/core/modules/filter/tests/src/Kernel/Plugin/migrate/source/d7/FilterFormatTest.php @@ -21,7 +21,7 @@ class FilterFormatTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/filter/tests/src/Unit/FilterHtmlTest.php b/core/modules/filter/tests/src/Unit/FilterHtmlTest.php index 1c3e3f054d6..d020f1d0197 100644 --- a/core/modules/filter/tests/src/Unit/FilterHtmlTest.php +++ b/core/modules/filter/tests/src/Unit/FilterHtmlTest.php @@ -52,7 +52,7 @@ class FilterHtmlTest extends UnitTestCase { * @return array * An array of test data. */ - public function providerFilterAttributes() { + public static function providerFilterAttributes() { return [ ['<a href="/blog" title="Blog">Blog</a>', '<a href="/blog">Blog</a>'], ['<p dir="rtl" />', '<p dir="rtl"></p>'], diff --git a/core/modules/filter/tests/src/Unit/FilterImageLazyLoadTest.php b/core/modules/filter/tests/src/Unit/FilterImageLazyLoadTest.php index 847b3dcc5ff..4b7f471879b 100644 --- a/core/modules/filter/tests/src/Unit/FilterImageLazyLoadTest.php +++ b/core/modules/filter/tests/src/Unit/FilterImageLazyLoadTest.php @@ -46,7 +46,7 @@ final class FilterImageLazyLoadTest extends UnitTestCase { * @return array * An array of test data. */ - public function providerHtml(): array { + public static function providerHtml(): array { return [ 'lazy loading attribute already added' => [ 'input' => '<p><img src="foo.png" loading="lazy"></p>', diff --git a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php index e7444aa0059..1b882bd98d3 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php @@ -249,7 +249,7 @@ class ImageFieldValidateTest extends ImageFieldTestBase { * @return array * Test cases. */ - public function providerTestEmpty() { + public static function providerTestEmpty() { return [ 'optional-single' => ['field_image', FALSE, 1, 'files[field_image_0]', 'Article Article with edit-access-allowed image field has been created.', 'Article Article with edit-access-forbidden image field has been created.'], 'optional-unlimited' => ['field_image', FALSE, FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, 'files[field_image_0][]', 'Article Article with edit-access-allowed image field has been created.', 'Article Article with edit-access-forbidden image field has been created.'], diff --git a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php index 2e7759a41f2..2e79a71272b 100644 --- a/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php +++ b/core/modules/image/tests/src/Kernel/ImageStyleCustomStreamWrappersTest.php @@ -102,7 +102,7 @@ class ImageStyleCustomStreamWrappersTest extends KernelTestBase { * - The derivative expected stream wrapper scheme. * - The stream wrapper service class. */ - public function providerTestCustomStreamWrappers() { + public static function providerTestCustomStreamWrappers() { return [ ['public', 'public', PublicStream::class], ['private', 'private', PrivateStream::class], diff --git a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php index 80d8b541981..6aea5817778 100644 --- a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php +++ b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php @@ -23,7 +23,7 @@ class ImageCachePresetTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php index df88fb0f467..906d197ce3c 100644 --- a/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php +++ b/core/modules/image/tests/src/Kernel/Plugin/migrate/source/d7/ImageStylesTest.php @@ -23,7 +23,7 @@ class ImageStylesTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php b/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php index ecdff2372f8..eb6866f1738 100644 --- a/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php +++ b/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php @@ -77,7 +77,7 @@ class DenyPrivateImageStyleDownloadTest extends UnitTestCase { * @return array * Data and expected results. */ - public function providerPrivateImageStyleDownloadPolicy() { + public static function providerPrivateImageStyleDownloadPolicy() { return [ [ResponsePolicyInterface::DENY, 'image.style_private'], [NULL, 'some.other.route'], diff --git a/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php b/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php index 1963cb02b9e..924bd6dab38 100644 --- a/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php @@ -182,7 +182,7 @@ class ExternalNormalizersTest extends BrowserTestBase { * @return array * Test cases. */ - public function providerTestFormatAgnosticNormalizers() { + public static function providerTestFormatAgnosticNormalizers() { return [ 'Format-agnostic @FieldType-level normalizers SHOULD NOT be able to affect the JSON:API normalization' => [ 'jsonapi_test_field_type', diff --git a/core/modules/jsonapi/tests/src/Functional/TermTest.php b/core/modules/jsonapi/tests/src/Functional/TermTest.php index 5a56f19b1b2..bebe37dda40 100644 --- a/core/modules/jsonapi/tests/src/Functional/TermTest.php +++ b/core/modules/jsonapi/tests/src/Functional/TermTest.php @@ -484,7 +484,7 @@ class TermTest extends ResourceTestBase { /** * Data provider for ::testGetIndividualTermWithParent(). */ - public function providerTestGetIndividualTermWithParent() { + public static function providerTestGetIndividualTermWithParent() { return [ 'root parent: [0] (= no parent)' => [ [0], diff --git a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php index f5399289798..7393e99b183 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php @@ -96,7 +96,7 @@ class FieldResolverTest extends JsonapiKernelTestBase { /** * Provides test cases for resolveInternalEntityQueryPath. */ - public function resolveInternalIncludePathProvider() { + public static function resolveInternalIncludePathProvider() { return [ 'entity reference' => [[['field_test_ref2']], 'field_test_ref2'], 'entity reference with multi target bundles' => [[['field_test_ref1']], 'field_test_ref1'], @@ -142,7 +142,7 @@ class FieldResolverTest extends JsonapiKernelTestBase { /** * Provides test cases for ::testResolveInternalIncludePathError. */ - public function resolveInternalIncludePathErrorProvider() { + public static function resolveInternalIncludePathErrorProvider() { return [ // Should fail because none of these bundles have these fields. ['entity_test_with_bundle', 'bundle1', 'host.fail!!.deep'], @@ -180,7 +180,7 @@ class FieldResolverTest extends JsonapiKernelTestBase { /** * Provides test cases for ::testResolveInternalEntityQueryPath. */ - public function resolveInternalEntityQueryPathProvider() { + public static function resolveInternalEntityQueryPathProvider() { return [ 'config entity as base' => [ 'uuid', 'id', 'entity_test_bundle', 'entity_test_bundle', @@ -265,7 +265,7 @@ class FieldResolverTest extends JsonapiKernelTestBase { /** * Provides test cases for ::testResolveInternalEntityQueryPathError. */ - public function resolveInternalEntityQueryPathErrorProvider() { + public static function resolveInternalEntityQueryPathErrorProvider() { return [ 'nested fields' => [ 'entity_test_with_bundle', 'bundle1', 'none.of.these.exist', diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index 41f32c9bf37..f9a022b3497 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -776,7 +776,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase { /** * Provides test cases for asserting cacheable metadata behavior. */ - public function testCacheableMetadataProvider() { + public static function testCacheableMetadataProvider() { $cacheable_metadata = function ($metadata) { return CacheableMetadata::createFromRenderArray(['#cache' => $metadata]); }; diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php index 305a7309b7b..02cb357ac69 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php @@ -168,7 +168,7 @@ class LinkCollectionNormalizerTest extends KernelTestBase { * * @return array[] */ - public function linkAccessTestData() { + public static function linkAccessTestData() { return [ 'the edit-form link is present because uid 2 has access to the targeted resource (its own edit form)' => [ 'uid' => 2, diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php index f27dbed3159..f575410c92c 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/RelationshipNormalizerTest.php @@ -262,7 +262,7 @@ class RelationshipNormalizerTest extends JsonapiKernelTestBase { /** * Data provider for testNormalize. */ - public function normalizeProvider() { + public static function normalizeProvider() { return [ 'single cardinality' => [ ['user1'], diff --git a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php index b271cb68755..5dde622981a 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php @@ -327,7 +327,7 @@ class FilterTest extends JsonapiKernelTestBase { /** * Data provider for testCreateFromQueryParameter. */ - public function parameterProvider() { + public static function parameterProvider() { return [ 'shorthand' => [ ['uid' => ['value' => 1]], diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php index 5ee39d67366..75f75a0f3b3 100644 --- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php @@ -144,7 +144,7 @@ class RelatedResourceTypesTest extends JsonapiKernelTestBase { * @covers ::getRelatableResourceTypes * @dataProvider getRelatableResourceTypesProvider */ - public function getRelatableResourceTypesProvider() { + public static function getRelatableResourceTypesProvider() { return [ [ 'node--foo', @@ -174,7 +174,7 @@ class RelatedResourceTypesTest extends JsonapiKernelTestBase { /** * Provides cases to test getRelatableTypesByField. */ - public function getRelatableResourceTypesByFieldProvider() { + public static function getRelatableResourceTypesByFieldProvider() { return [ ['node', 'foo', 'field_ref_foo'], ['node', 'foo', 'field_ref_bar'], diff --git a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php index e9820e1a08f..5207ede69e4 100644 --- a/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php @@ -97,7 +97,7 @@ class ResourceTypeRepositoryTest extends JsonapiKernelTestBase { * @return array * The data for the test method. */ - public function getProvider() { + public static function getProvider() { return [ ['node', 'article', 'Drupal\node\Entity\Node'], ['node', '42', 'Drupal\node\Entity\Node'], @@ -147,7 +147,7 @@ class ResourceTypeRepositoryTest extends JsonapiKernelTestBase { * @return array * The data for the test method. */ - public function getFieldsProvider() { + public static function getFieldsProvider() { return [ [['type', 'node_type']], [['id', 'node_id']], diff --git a/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php b/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php index 5875ebc06c7..7ca219a3e41 100644 --- a/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php +++ b/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php @@ -72,7 +72,7 @@ class ResourceResponseValidatorTest extends UnitTestCase { * @return array * An array of test cases. */ - public function validateResponseProvider() { + public static function validateResponseProvider() { $defaults = [ 'route_name' => 'jsonapi.node--article.individual', 'resource_type' => new ResourceType('node', 'article', NULL), diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index e88a8d29b62..da5d2aeb44d 100644 --- a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -103,7 +103,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends UnitTestCase { * @return array * The data for the test method. */ - public function denormalizeProvider() { + public static function denormalizeProvider() { return [ [ [ @@ -240,7 +240,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends UnitTestCase { /** * Provides test cases for testDenormalizeUuid. */ - public function denormalizeUuidProvider() { + public static function denormalizeUuidProvider() { return [ 'valid' => ['76dd5c18-ea1b-4150-9e75-b21958a2b836', FALSE], 'missing' => [NULL, FALSE], diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php index 4b15495a097..fc78271bf3b 100644 --- a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php @@ -128,7 +128,7 @@ class ResourceIdentifierNormalizerTest extends UnitTestCase { * @return array * The data for the test method. */ - public function denormalizeProvider() { + public static function denormalizeProvider() { return [ [ ['data' => [['type' => 'lorem--dummy_bundle', 'id' => '4e6cb61d-4f04-437f-99fe-42c002393658']]], @@ -168,7 +168,7 @@ class ResourceIdentifierNormalizerTest extends UnitTestCase { * @return array * The input data for the test method. */ - public function denormalizeInvalidResourceProvider() { + public static function denormalizeInvalidResourceProvider() { return [ [ [ diff --git a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php index 2cc50c559dc..5544e70012e 100644 --- a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionGroupTest.php @@ -41,7 +41,7 @@ class EntityConditionGroupTest extends UnitTestCase { /** * Data provider for testConstruct. */ - public function constructProvider() { + public static function constructProvider() { return [ [['conjunction' => 'AND', 'members' => []]], [['conjunction' => 'OR', 'members' => []]], diff --git a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php index 9ea56e57056..adea6af9f0d 100644 --- a/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php @@ -49,7 +49,7 @@ class EntityConditionTest extends UnitTestCase { /** * Data provider for testDenormalize. */ - public function queryParameterProvider() { + public static function queryParameterProvider() { return [ [['path' => 'some_field', 'value' => NULL, 'operator' => '=']], [['path' => 'some_field', 'operator' => '=', 'value' => 'some_string']], @@ -87,7 +87,7 @@ class EntityConditionTest extends UnitTestCase { /** * Data provider for testValidation. */ - public function validationProvider() { + public static function validationProvider() { return [ [['path' => 'some_field', 'value' => 'some_value'], NULL], [ diff --git a/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php b/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php index af1b3292bd9..264d3bd7f61 100644 --- a/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php @@ -46,7 +46,7 @@ class OffsetPageTest extends UnitTestCase { /** * Data provider for testCreateFromQueryParameter. */ - public function parameterProvider() { + public static function parameterProvider() { return [ [['offset' => 12, 'limit' => 20], ['offset' => 12, 'limit' => 20]], [['offset' => 12, 'limit' => 60], ['offset' => 12, 'limit' => 50]], diff --git a/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php b/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php index 5aa88a11c71..14b3faa9f52 100644 --- a/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Query/SortTest.php @@ -49,7 +49,7 @@ class SortTest extends UnitTestCase { /** * Provides a suite of shortcut sort parameters and their expected expansions. */ - public function parameterProvider() { + public static function parameterProvider() { return [ ['lorem', [['path' => 'lorem', 'direction' => 'ASC', 'langcode' => NULL]]], [ @@ -93,7 +93,7 @@ class SortTest extends UnitTestCase { /** * Data provider for testCreateFromQueryParameterFail. */ - public function badParameterProvider() { + public static function badParameterProvider() { return [ [[['lorem']]], [''], diff --git a/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php b/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php index 5ea0022b531..59000936c3e 100644 --- a/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Routing/RoutesTest.php @@ -198,7 +198,7 @@ class RoutesTest extends UnitTestCase { /** * Lists routes which should have been created. */ - public function expectedRoutes() { + public static function expectedRoutes() { return [ ['jsonapi.entity_type_1--bundle_1_1.individual'], ['jsonapi.entity_type_1--bundle_1_1.collection'], @@ -232,7 +232,7 @@ class RoutesTest extends UnitTestCase { /** * Lists routes which should have been created. */ - public function notExpectedRoutes() { + public static function notExpectedRoutes() { return [ ['jsonapi.entity_type_2--bundle_2_1.individual'], ['jsonapi.entity_type_2--bundle_2_1.collection'], diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php index d04b57af5b9..31d48685021 100644 --- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php +++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/LanguageTest.php @@ -20,7 +20,7 @@ class LanguageTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php index f4fa2dacce0..939edc14aca 100644 --- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php +++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentSettingsTest.php @@ -21,7 +21,7 @@ class LanguageContentSettingsTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php index b7cb2b5f2cc..9631ebe6256 100644 --- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php +++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php @@ -21,7 +21,7 @@ class LanguageContentTaxonomyVocabularySettingsTest extends MigrateSqlSourceTest /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php index 3fc1df57c33..5489164813b 100644 --- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php +++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentSettingsTest.php @@ -21,7 +21,7 @@ class LanguageContentSettingsTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php index c681cd1082a..f48f336de58 100644 --- a/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php +++ b/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d7/LanguageContentTaxonomyVocabularySettingsTest.php @@ -21,7 +21,7 @@ class LanguageContentTaxonomyVocabularySettingsTest extends VocabularyTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // Get the source data from parent. $tests = parent::providerSource(); diff --git a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php index 960730908f1..82bace1834e 100644 --- a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php +++ b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php @@ -180,7 +180,7 @@ class ContentLanguageSettingsUnitTest extends UnitTestCase { $this->assertSame($expected, $config->isLanguageAlterable()); } - public function providerLanguageAlterable() { + public static function providerLanguageAlterable() { $alterableConfig = new ContentLanguageSettings([ 'target_entity_type_id' => 'test_entity_type', 'target_bundle' => 'test_bundle', diff --git a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php index 8eaf87478dd..5cea18f24ed 100644 --- a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php +++ b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php @@ -113,7 +113,7 @@ class LanguageNegotiationUrlTest extends UnitTestCase { * @return array * An array of data for checking path prefix negotiation. */ - public function providerTestPathPrefix() { + public static function providerTestPathPrefix() { $path_prefix_configuration[] = [ 'prefix' => 'de', 'prefixes' => [ @@ -214,7 +214,7 @@ class LanguageNegotiationUrlTest extends UnitTestCase { * An array of data for checking path prefix negotiation for neutral * languages. */ - public function providerNeutralLanguages() { + public static function providerNeutralLanguages() { return [ [LanguageInterface::LANGCODE_NOT_APPLICABLE, NULL], [LanguageInterface::LANGCODE_NOT_SPECIFIED, 'en'], @@ -263,7 +263,7 @@ class LanguageNegotiationUrlTest extends UnitTestCase { * @return array * An array of data for checking domain negotiation. */ - public function providerTestDomain() { + public static function providerTestDomain() { $domain_configuration[] = [ 'http_host' => 'example.de', diff --git a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php index c246618cfb1..f69026f7f98 100644 --- a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php +++ b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php @@ -35,7 +35,7 @@ class LanguageLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getLanguageAdminOverviewRoutes() { + public static function getLanguageAdminOverviewRoutes() { return [ ['entity.configurable_language.collection', [['entity.configurable_language.collection', 'language.negotiation']]], ['language.negotiation', [['entity.configurable_language.collection', 'language.negotiation']]], diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php index 24983d439d6..bb813234374 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php @@ -141,7 +141,7 @@ class LayoutBuilderAccessTest extends BrowserTestBase { /** * Provides test data for ::testAccessWithBundles(). */ - public function providerTestAccessWithBundles() { + public static function providerTestAccessWithBundles() { // Data provider values are: // - the permissions to grant to the user // - whether access is expected for the defaults @@ -235,7 +235,7 @@ class LayoutBuilderAccessTest extends BrowserTestBase { /** * Provides test data for ::testAccessWithoutBundles(). */ - public function providerTestAccessWithoutBundles() { + public static function providerTestAccessWithoutBundles() { // Data provider values are: // - the permissions to grant to the user // - whether access is expected for the defaults diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php index f04478f8b00..f575bc85b72 100644 --- a/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php +++ b/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php @@ -59,7 +59,7 @@ class LayoutSectionTest extends BrowserTestBase { /** * Provides test data for ::testLayoutSectionFormatter(). */ - public function providerTestLayoutSectionFormatter() { + public static function providerTestLayoutSectionFormatter() { $data = []; $data['block_with_global_context'] = [ [ diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php index 75b465d1a26..b76512c8497 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php @@ -186,7 +186,7 @@ class InlineBlockTest extends InlineBlockTestBase { /** * Provides test data for ::testNoLayoutSave(). */ - public function layoutNoSaveProvider() { + public static function layoutNoSaveProvider() { return [ 'discard_changes' => [ 'discard_changes', diff --git a/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php index 864d0df00d1..e749f356432 100644 --- a/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php @@ -109,7 +109,7 @@ class DefaultsSectionStorageTest extends KernelTestBase { /** * Provides test data for ::testAccess(). */ - public function providerTestAccess() { + public static function providerTestAccess() { $section_data = [ new Section( 'layout_onecol', diff --git a/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php b/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php index 605006f12d0..24a45c9628e 100644 --- a/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php @@ -75,7 +75,7 @@ class FieldBlockTest extends EntityKernelTestBase { /** * Provides test data for ::testBlockAccessEntityNotAllowed(). */ - public function providerTestBlockAccessNotAllowed() { + public static function providerTestBlockAccessNotAllowed() { $data = []; $data['entity_forbidden'] = [ FALSE, @@ -176,7 +176,7 @@ class FieldBlockTest extends EntityKernelTestBase { /** * Provides test data for ::testBlockAccessEntityAllowedFieldHasValue(). */ - public function providerTestBlockAccessEntityAllowedFieldHasValue() { + public static function providerTestBlockAccessEntityAllowedFieldHasValue() { $data = []; $data['empty'] = [ FALSE, @@ -282,7 +282,7 @@ class FieldBlockTest extends EntityKernelTestBase { /** * Provides test data for ::testBuild(). */ - public function providerTestBuild() { + public static function providerTestBuild() { $data = []; $data['array'] = [ new ReturnPromise([['content' => ['#markup' => 'The field value']]]), diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php index e0df4ad034b..e18a30afbe4 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php @@ -64,7 +64,7 @@ class LayoutBuilderEntityViewDisplayTest extends SectionListTestBase { /** * Provides test data for ::testIsLayoutBuilderEnabled(). */ - public function providerTestIsLayoutBuilderEnabled() { + public static function providerTestIsLayoutBuilderEnabled() { $data = []; $data['default enabled'] = [TRUE, 'default', TRUE]; $data['default disabled'] = [FALSE, 'default', FALSE]; diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php index 1b9c74e59f1..62f77f78830 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutEntityHelperTraitTest.php @@ -49,7 +49,7 @@ class LayoutEntityHelperTraitTest extends KernelTestBase { /** * Data provider for testGetSectionStorageForEntity(). */ - public function providerTestGetSectionStorageForEntity() { + public static function providerTestGetSectionStorageForEntity() { $data = []; $data['entity_view_display'] = [ 'entity_view_display', @@ -122,7 +122,7 @@ class LayoutEntityHelperTraitTest extends KernelTestBase { /** * Data provider for testOriginalEntityUsesDefaultStorage(). */ - public function providerTestOriginalEntityUsesDefaultStorage() { + public static function providerTestOriginalEntityUsesDefaultStorage() { return [ 'original uses default' => [ [ diff --git a/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php b/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php index b4dbf785e17..ff4dcf7298c 100644 --- a/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php +++ b/core/modules/layout_builder/tests/src/Kernel/OverridesSectionStorageTest.php @@ -117,7 +117,7 @@ class OverridesSectionStorageTest extends KernelTestBase { /** * Provides test data for ::testAccess(). */ - public function providerTestAccess() { + public static function providerTestAccess() { $section_data = [ new Section('layout_onecol', [], [ '10000000-0000-1000-a000-000000000000' => new SectionComponent('10000000-0000-1000-a000-000000000000', 'content', ['id' => 'foo']), diff --git a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php index 0a769bca3ba..2e3de8b4bcc 100644 --- a/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php +++ b/core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php @@ -142,7 +142,7 @@ abstract class SectionListTestBase extends EntityKernelTestBase { /** * Provides test data for ::testRemoveAllSections(). */ - public function providerTestRemoveAllSections() { + public static function providerTestRemoveAllSections() { $data = []; $data[] = [NULL, []]; $data[] = [FALSE, []]; diff --git a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php index 7ace912fc5b..10787a76cb5 100644 --- a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php +++ b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php @@ -47,7 +47,7 @@ class BlockComponentRenderArrayTest extends UnitTestCase { /** * Data provider for test functions that should test block types. */ - public function providerBlockTypes() { + public static function providerBlockTypes() { return [ [TRUE], [FALSE], diff --git a/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php b/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php index a0abb96c7b5..190110cda71 100644 --- a/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php +++ b/core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php @@ -148,7 +148,7 @@ class DefaultsSectionStorageTest extends UnitTestCase { /** * Provides data for ::testExtractEntityFromRoute(). */ - public function providerTestExtractEntityFromRoute() { + public static function providerTestExtractEntityFromRoute() { // Data provider values are: // - whether a successful result is expected // - the expected entity ID diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php index 2b8cbd00f8b..b81f9b2ff61 100644 --- a/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php +++ b/core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php @@ -96,7 +96,7 @@ class LayoutBuilderIsActiveCacheContextTest extends UnitTestCase { /** * Provides test data for ::testGetContext(). */ - public function providerTestGetContext() { + public static function providerTestGetContext() { $data = []; $data['overridden'] = [ TRUE, diff --git a/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php b/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php index 6510e628934..a9f8ba3b4c2 100644 --- a/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php +++ b/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php @@ -120,7 +120,7 @@ class OverridesSectionStorageTest extends UnitTestCase { /** * Provides data for ::testExtractEntityFromRoute(). */ - public function providerTestExtractEntityFromRoute() { + public static function providerTestExtractEntityFromRoute() { // Data provider values are: // - whether a successful result is expected // - the expected entity ID diff --git a/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php b/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php index 64ffbf5abd3..0f3f8f0cc4c 100644 --- a/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php +++ b/core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php @@ -192,7 +192,7 @@ class SectionStorageManagerTest extends UnitTestCase { /** * Provides test data for ::testFindByContext(). */ - public function providerTestFindByContext() { + public static function providerTestFindByContext() { // Data provider values are: // - the result for the plugin's isApplicable() method to return. $data = []; diff --git a/core/modules/layout_builder/tests/src/Unit/SectionTest.php b/core/modules/layout_builder/tests/src/Unit/SectionTest.php index f911459daff..6ffa19570bd 100644 --- a/core/modules/layout_builder/tests/src/Unit/SectionTest.php +++ b/core/modules/layout_builder/tests/src/Unit/SectionTest.php @@ -210,7 +210,7 @@ class SectionTest extends UnitTestCase { /** * Provides test data for ::testGetThirdPartySettings(). */ - public function providerTestGetThirdPartySettings() { + public static function providerTestGetThirdPartySettings() { $data = []; $data[] = [ 'bad_judgement', @@ -286,7 +286,7 @@ class SectionTest extends UnitTestCase { /** * Provides test data for ::testSetThirdPartySettings(). */ - public function providerTestSetThirdPartySetting() { + public static function providerTestSetThirdPartySetting() { $data = []; $data[] = [ 'bad_judgement', @@ -330,7 +330,7 @@ class SectionTest extends UnitTestCase { /** * Provides test data for ::testUnsetThirdPartySetting(). */ - public function providerTestUnsetThirdPartySetting() { + public static function providerTestUnsetThirdPartySetting() { $data = []; $data['Key with values'] = [ 'bad_judgement', @@ -399,7 +399,7 @@ class SectionTest extends UnitTestCase { /** * Provides test data for ::testGetLayout(). */ - public function providerTestGetLayout() { + public static function providerTestGetLayout() { $data = []; $data['contexts'] = [['foo' => 'bar'], TRUE]; $data['no contexts'] = [[], FALSE]; diff --git a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php index 1e76337a638..afc7835ae0e 100644 --- a/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php +++ b/core/modules/layout_discovery/tests/src/Kernel/LayoutTest.php @@ -91,7 +91,7 @@ class LayoutTest extends KernelTestBase { /** * Data provider for testRenderLayout(). */ - public function renderLayoutData() { + public static function renderLayoutData() { $html = []; $html[] = '<div data-drupal-selector="edit-layout" class="layout layout--onecol">'; $html[] = '<div data-drupal-selector="edit-content" class="layout__region layout__region--content">'; diff --git a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php index 2a6d9ca6b64..bc76b1e78a1 100644 --- a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php +++ b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php @@ -64,7 +64,7 @@ class LinkFieldFormStatesTest extends WebDriverTestBase { /** * Provides data for ::testLinkFieldJSFormStates. */ - public function linkFieldFormStatesData() { + public static function linkFieldFormStatesData() { return [ 'Fill uri, keep title empty' => [ 'https://example.com', diff --git a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php index 1ed27c50976..e88b6329672 100644 --- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php +++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php @@ -51,7 +51,7 @@ class LinkExternalProtocolsConstraintValidatorTest extends UnitTestCase { /** * Data provider for ::testValidate. */ - public function providerValidate() { + public static function providerValidate() { $data = []; // Test allowed protocols. diff --git a/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php index 87c399172e9..fb09c54c68e 100644 --- a/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php +++ b/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php @@ -33,7 +33,7 @@ class FieldLinkTest extends UnitTestCase { /** * Data provider for testCanonicalizeUri. */ - public function canonicalizeUriDataProvider() { + public static function canonicalizeUriDataProvider() { return [ 'Simple front-page' => [ '<front>', diff --git a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php index 7ea710286ee..7df92f83b31 100644 --- a/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php @@ -104,7 +104,7 @@ class LocaleLocaleLookupTest extends BrowserTestBase { * - translation value * - expected result */ - public function providerTestFixOldPluralStyle() { + public static function providerTestFixOldPluralStyle() { return [ 'non-plural translation' => ['@count[2] non-plural test', '@count[2] non-plural test'], 'plural translation' => ['@count[2] plural test' . PoItem::DELIMITER, '@count plural test'], diff --git a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php index d4de8d8106e..1a01ed15981 100644 --- a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php +++ b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php @@ -195,7 +195,7 @@ class LocaleLookupTest extends UnitTestCase { /** * Provides test data for testResolveCacheMissWithFallback(). */ - public function resolveCacheMissWithFallbackProvider() { + public static function resolveCacheMissWithFallbackProvider() { // cSpell:disable return [ ['cs', 'test', 'irrelevant', 'test v české'], @@ -325,7 +325,7 @@ class LocaleLookupTest extends UnitTestCase { /** * Provides test data for testResolveCacheMissWithFallback(). */ - public function providerFixOldPluralTranslationProvider() { + public static function providerFixOldPluralTranslationProvider() { $translations = [ 'by' => [ 'word1' => '@count[2] word-by', @@ -373,7 +373,7 @@ class LocaleLookupTest extends UnitTestCase { /** * Provides test data for testGetCid(). */ - public function getCidProvider() { + public static function getCidProvider() { return [ [ ['a'], 'locale:en:irrelevant:a', diff --git a/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php b/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php index 72ad654bad7..f56b021476b 100644 --- a/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php +++ b/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php @@ -38,7 +38,7 @@ class LocaleLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getLocalePageRoutes() { + public static function getLocalePageRoutes() { return [ ['locale.translate_page'], ['locale.translate_import'], diff --git a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php index 269160976d8..ee70fb8f579 100644 --- a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php +++ b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php @@ -55,7 +55,7 @@ class OEmbedFormatterTest extends MediaFunctionalTestBase { * * @return array */ - public function providerRender() { + public static function providerRender() { return [ 'Vimeo video' => [ 'https://vimeo.com/7073899', diff --git a/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php b/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php index 49489022eea..4a4f395ff47 100644 --- a/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php +++ b/core/modules/media/tests/src/Functional/MediaUiReferenceWidgetTest.php @@ -50,7 +50,7 @@ class MediaUiReferenceWidgetTest extends MediaFunctionalTestBase { * @return array[] * Test data. See testMediaReferenceWidget() for the child array structure. */ - public function providerTestMediaReferenceWidget() { + public static function providerTestMediaReferenceWidget() { return [ // Single-value fields with a single media type and the default widget: // - The user can create and list the media. diff --git a/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php b/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php index d791a2f90ea..6c812dae765 100644 --- a/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php +++ b/core/modules/media/tests/src/Functional/ProviderRepositoryTest.php @@ -50,7 +50,7 @@ class ProviderRepositoryTest extends MediaFunctionalTestBase { * * @return array */ - public function providerEmptyProviderList() { + public static function providerEmptyProviderList() { return [ 'empty array' => ['[]'], 'empty string' => [''], @@ -84,7 +84,7 @@ class ProviderRepositoryTest extends MediaFunctionalTestBase { * * @return array */ - public function providerNonExistingProviderDatabase() { + public static function providerNonExistingProviderDatabase() { return [ [ 'http://oembed1.com/providers.json', diff --git a/core/modules/media/tests/src/Functional/ResourceFetcherTest.php b/core/modules/media/tests/src/Functional/ResourceFetcherTest.php index b83f7b9fa88..699e07ad19b 100644 --- a/core/modules/media/tests/src/Functional/ResourceFetcherTest.php +++ b/core/modules/media/tests/src/Functional/ResourceFetcherTest.php @@ -35,7 +35,7 @@ class ResourceFetcherTest extends MediaFunctionalTestBase { * * @return array */ - public function providerFetchResource() { + public static function providerFetchResource() { return [ 'JSON resource' => [ 'video_vimeo.json', diff --git a/core/modules/media/tests/src/Functional/UrlResolverTest.php b/core/modules/media/tests/src/Functional/UrlResolverTest.php index beb88d0de87..2af6722a863 100644 --- a/core/modules/media/tests/src/Functional/UrlResolverTest.php +++ b/core/modules/media/tests/src/Functional/UrlResolverTest.php @@ -37,7 +37,7 @@ class UrlResolverTest extends MediaFunctionalTestBase { * * @return array */ - public function providerEndpointMatching() { + public static function providerEndpointMatching() { return [ 'match by endpoint: Twitter' => [ 'https://twitter.com/Dries/status/999985431595880448', @@ -99,7 +99,7 @@ class UrlResolverTest extends MediaFunctionalTestBase { * * @return array */ - public function providerUrlDiscovery() { + public static function providerUrlDiscovery() { return [ 'JSON resource' => [ 'video_vimeo.html', diff --git a/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php b/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php index 9853060416c..af64534a649 100644 --- a/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php +++ b/core/modules/media/tests/src/Kernel/MediaAccessControlHandlerTest.php @@ -132,7 +132,7 @@ class MediaAccessControlHandlerTest extends MediaKernelTestBase { * @return array * The data sets to test. */ - public function providerAccess() { + public static function providerAccess() { $test_data = []; // Check published / unpublished media access for a user owning the media @@ -624,7 +624,7 @@ class MediaAccessControlHandlerTest extends MediaKernelTestBase { * @return array * The data sets to test. */ - public function providerCreateAccess() { + public static function providerCreateAccess() { $test_data = []; // Check create access for a user without permissions. diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php index 6a9e6717ac0..0b20c3f8f8d 100644 --- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php +++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTest.php @@ -44,7 +44,7 @@ class MediaEmbedFilterTest extends MediaEmbedFilterTestBase { /** * Data provider for testBasics(). */ - public function providerTestBasics() { + public static function providerTestBasics() { $default_cacheability = (new CacheableMetadata()) ->setCacheTags([ '_media_test_embed_filter_access:media:1', @@ -162,7 +162,7 @@ class MediaEmbedFilterTest extends MediaEmbedFilterTestBase { /** * Data provider for testAccessUnpublished(). */ - public function providerAccessUnpublished() { + public static function providerAccessUnpublished() { return [ 'user cannot access embedded media' => [ FALSE, @@ -260,7 +260,7 @@ class MediaEmbedFilterTest extends MediaEmbedFilterTestBase { /** * Data provider for testOverridesAltAndTitle(). */ - public function providerOverridesAltAndTitle() { + public static function providerOverridesAltAndTitle() { return [ '`title` field property disabled ⇒ `title` is not overridable' => [ FALSE, @@ -306,7 +306,7 @@ class MediaEmbedFilterTest extends MediaEmbedFilterTestBase { /** * Data provider for testMissingEntityIndicator(). */ - public function providerMissingEntityIndicator() { + public static function providerMissingEntityIndicator() { return [ 'invalid UUID' => [ 'uuid' => 'invalidUUID', @@ -425,7 +425,7 @@ class MediaEmbedFilterTest extends MediaEmbedFilterTestBase { /** * Data provider for testFilterIntegration(). */ - public function providerFilterIntegration() { + public static function providerFilterIntegration() { $default_asset_libraries = ['media/filter.caption']; $caption_additional_attributes = ['data-caption' => 'Yo.']; diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php index ead63b80b8c..da9335a6b5e 100644 --- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php +++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTranslationTest.php @@ -68,7 +68,7 @@ class MediaEmbedFilterTranslationTest extends MediaEmbedFilterTestBase { /** * Data provider for testTranslationSelection(). */ - public function providerTranslationSituations() { + public static function providerTranslationSituations() { $embedded_entity_translation_languages = ['en', 'pt-br']; foreach (['en', 'pt-br', 'nl'] as $text_langcode) { diff --git a/core/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php b/core/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php index f02290e7f5c..4671e43fb99 100644 --- a/core/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php +++ b/core/modules/media/tests/src/Kernel/MediaThumbnailFormatterTest.php @@ -91,7 +91,7 @@ class MediaThumbnailFormatterTest extends MediaKernelTestBase { * * @return array[] */ - public function providerTestSettingsSummary(): array { + public static function providerTestSettingsSummary(): array { return [ 'link to content' => [ [ diff --git a/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php b/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php index be3b092508f..67b465c450f 100644 --- a/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php +++ b/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php @@ -50,7 +50,7 @@ class OEmbedSourceTest extends MediaKernelTestBase { * @return array * Sets of arguments to pass to the test method. */ - public function providerThumbnailUri(): array { + public static function providerThumbnailUri(): array { return [ 'no query string, extension in URL' => [ 'internal:/core/misc/druplicon.png', diff --git a/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php b/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php index 8bcf151c7f8..c4eb068ffcc 100644 --- a/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php +++ b/core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php @@ -23,7 +23,7 @@ class IFrameUrlHelperTest extends UnitTestCase { * * @return array */ - public function providerIsSecure() { + public static function providerIsSecure() { return [ 'no domain' => [ '/path/to/media.php', diff --git a/core/modules/media/tests/src/Unit/ProviderRepositoryTest.php b/core/modules/media/tests/src/Unit/ProviderRepositoryTest.php index ec353f19543..c45b1e4d609 100644 --- a/core/modules/media/tests/src/Unit/ProviderRepositoryTest.php +++ b/core/modules/media/tests/src/Unit/ProviderRepositoryTest.php @@ -166,7 +166,7 @@ END; * @return array[] * Sets of arguments to pass to the test method. */ - public function providerInvalidResponse(): array { + public static function providerInvalidResponse(): array { return [ 'expired' => [ -86400, diff --git a/core/modules/media/tests/src/Unit/ResourceTest.php b/core/modules/media/tests/src/Unit/ResourceTest.php index b47099e212f..cff1d3ab5bb 100644 --- a/core/modules/media/tests/src/Unit/ResourceTest.php +++ b/core/modules/media/tests/src/Unit/ResourceTest.php @@ -16,7 +16,7 @@ class ResourceTest extends UnitTestCase { /** * Test cases for ::testSetDimensions. */ - public function setDimensionsTestCases() { + public static function setDimensionsTestCases() { return [ 'Standard rich dimensions' => [ 'rich', diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php index 75378f05367..36e294abb77 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php @@ -150,7 +150,7 @@ class EmbeddedFormWidgetTest extends WebDriverTestBase { * @return array * Test data. */ - public function insertionReselectionProvider() { + public static function insertionReselectionProvider() { return [ 'using media_library_widget' => [ 'widget' => 'media_library_widget', diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php index a9139748901..36692a563c9 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php @@ -174,7 +174,7 @@ class WidgetOverflowTest extends MediaLibraryTestBase { * @return array[] * Sets of arguments to pass to the test method. */ - public function providerWidgetOverflow(): array { + public static function providerWidgetOverflow(): array { return [ 'Save' => [NULL], 'Save and insert' => ['insert'], diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php index 207b1f32417..0df7497470d 100644 --- a/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php +++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php @@ -163,7 +163,7 @@ class MediaLibraryAccessTest extends KernelTestBase { /** * Data provider for ::testEditorOpenerAccess. */ - public function editorOpenerAccessProvider() { + public static function editorOpenerAccessProvider() { return [ 'media_embed filter enabled' => [ TRUE, @@ -244,7 +244,7 @@ class MediaLibraryAccessTest extends KernelTestBase { * @return array[] * Sets of arguments to pass to the test method. */ - public function providerFieldWidgetEntityFieldAccess(): array { + public static function providerFieldWidgetEntityFieldAccess(): array { return [ ['entity_reference'], ['entity_reference_subclass'], diff --git a/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php b/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php index f174f014131..57a6b75f97c 100644 --- a/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php +++ b/core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php @@ -118,7 +118,7 @@ class MediaLibraryStateTest extends KernelTestBase { * @return array * The data sets to test. */ - public function providerCreate() { + public static function providerCreate() { $test_data = []; // Assert no exception is thrown when we add the parameters as expected. @@ -306,7 +306,7 @@ class MediaLibraryStateTest extends KernelTestBase { * @return array * The data sets to test. */ - public function providerFromRequest() { + public static function providerFromRequest() { $test_data = []; // Assert no exception is thrown when we use valid state parameters. diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php index 01ac9ffd849..d9aa5b0708a 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php @@ -62,7 +62,7 @@ class LinkUriTest extends KernelTestBase { * - The value array to pass to LinkUri::transform(). * - The expected path returned by LinkUri::transform(). */ - public function providerTestRouted() { + public static function providerTestRouted() { $tests = []; $value = 'http://example.com'; @@ -105,7 +105,7 @@ class LinkUriTest extends KernelTestBase { * - The expected path returned by LinkUri::transform(). * - (optional) A URL object that the path validator prophecy will return. */ - public function providerTestNotRouted() { + public static function providerTestNotRouted() { $tests = []; $message = 'The path "%s" failed validation.'; @@ -155,7 +155,7 @@ class LinkUriTest extends KernelTestBase { * - The value array to pass to LinkUri::transform(). * - The expected path returned by LinkUri::transform(). */ - public function providerTestDisablingRouteValidation() { + public static function providerTestDisablingRouteValidation() { $tests = []; $value = 'node/1'; diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php index 05e4d9fe38b..84ba5f93167 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/MenuLinkTest.php @@ -25,7 +25,7 @@ class MenuLinkTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php index a61096eadfb..52614e05218 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d6/MenuLinkTranslationTest.php @@ -22,7 +22,7 @@ class MenuLinkTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; $test[0]['source_data']['menu_links'] = [ [ diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkLocalizedTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkLocalizedTest.php index d6cb4112e0e..37ef4fce9a4 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkLocalizedTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkLocalizedTest.php @@ -22,7 +22,7 @@ class MenuLinkLocalizedTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['menu_links'] = [ [ diff --git a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkTranslationTest.php b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkTranslationTest.php index 35876e6bbe5..9f8b3adf93d 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkTranslationTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/source/d7/MenuLinkTranslationTest.php @@ -22,7 +22,7 @@ class MenuLinkTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; $test[0]['source_data']['menu_links'] = [ [ diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php index 2fe723911c8..4aa35b2d2de 100644 --- a/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php +++ b/core/modules/menu_ui/tests/src/Functional/MenuUiContentTranslationTest.php @@ -101,7 +101,7 @@ class MenuUiContentTranslationTest extends BrowserTestBase { * @return array * Data sets to test keyed by data set label. */ - public function provideChangeContentToPseudoLanguageData() { + public static function provideChangeContentToPseudoLanguageData() { return [ 'und' => ['langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED], 'zxx' => ['langcode' => LanguageInterface::LANGCODE_NOT_APPLICABLE], diff --git a/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php b/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php index a2eaa6e4462..50d5793ce0f 100644 --- a/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php +++ b/core/modules/migrate/tests/src/Kernel/HighWaterNotJoinableTest.php @@ -22,7 +22,7 @@ class HighWaterNotJoinableTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // Test high water when the map is not joinable. diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php index 56f6db4bdf0..6cc02b6f81a 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php @@ -48,7 +48,7 @@ abstract class MigrateSourceTestBase extends KernelTestBase { * counted. * - (optional) Array of configuration options for the plugin under test. */ - abstract public function providerSource(); + abstract public static function providerSource(); /** * {@inheritdoc} diff --git a/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php index 44fe7878bab..11364ebdb3b 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php @@ -52,7 +52,7 @@ class MigrationPluginManagerTest extends MigrateTestBase { /** * Data provider for testCreateInstancesByTag. */ - public function providerCreateInstanceByTag() { + public static function providerCreateInstanceByTag() { return [ 'get test' => [ 'test', diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php index 618b548f10b..0ba5fe49980 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php @@ -39,7 +39,7 @@ class MigrationPluginConfigurationTest extends KernelTestBase { /** * Provide configuration data for testing. */ - public function mergeProvider() { + public static function mergeProvider() { return [ // Tests adding new configuration to a migration. [ diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php index 2312e6f74d5..2e53ebc263d 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php @@ -200,7 +200,7 @@ class MigrationProvidersExistTest extends MigrateDrupalTestBase { * @return array * Array of plugin definitions. */ - public function fieldPluginDefinitionsProvider() { + public static function fieldPluginDefinitionsProvider() { return [ 'missing_core_scenario' => [ 'definitions' => [ diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php index 0211874690a..9a7caf0dabf 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php @@ -71,7 +71,7 @@ class MigrationTest extends KernelTestBase { /** * Provides data for testing invalid process pipeline. */ - public function getProcessPluginsExceptionMessageProvider() { + public static function getProcessPluginsExceptionMessageProvider() { return [ [ 'Null' => diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php index fbf5765851f..6a93ad21c0d 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php @@ -96,7 +96,7 @@ class SqlTest extends MigrateTestBase { /** * Provides data for testEnsureTables. */ - public function providerTestEnsureTables() { + public static function providerTestEnsureTables() { return [ 'no ids' => [ [], @@ -156,7 +156,7 @@ class SqlTest extends MigrateTestBase { /** * Provides data for testFailEnsureTables. */ - public function providerTestFailEnsureTables() { + public static function providerTestFailEnsureTables() { return [ 'one id' => [ [ diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSqlSourceCountCacheTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSqlSourceCountCacheTest.php index b5b4db34aa8..5914cbf6f98 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSqlSourceCountCacheTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSqlSourceCountCacheTest.php @@ -23,7 +23,7 @@ class MigrateSqlSourceCountCacheTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // All tests use the same source_data, expected_data, expected_count, and // high_water. The high water is set later to maintain the order of the // parameters. diff --git a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php index 87dd77ba918..ad65962e06e 100644 --- a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php +++ b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php @@ -189,7 +189,7 @@ class SqlBaseTest extends MigrateTestBase { * @return array * The scenarios to test. */ - public function highWaterDataProvider() { + public static function highWaterDataProvider() { return [ 'no high-water value set' => [], 'high-water value set' => [33], diff --git a/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php b/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php index c85f8aab1a5..5537d99378c 100644 --- a/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/ExtractTest.php @@ -80,7 +80,7 @@ class ExtractTest extends KernelTestBase { /** * Provides multiple source data for "extract" process plugin test. */ - public function multipleValueProviderSource() { + public static function multipleValueProviderSource() { $tests = [ [ 'source_data' => [ diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php index ae52f6c6fe7..3c5c5e1d0c4 100644 --- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php @@ -109,7 +109,7 @@ class FileCopyTest extends FileTestBase { /** * Provides the source and destination path files. */ - public function providerSuccessfulReuse() { + public static function providerSuccessfulReuse() { return [ [ 'local_source_path' => static::getDrupalRoot() . '/core/tests/fixtures/files/image-test.jpg', diff --git a/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php b/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php index 548219feb15..29f4e682943 100644 --- a/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php @@ -136,7 +136,7 @@ class HandleMultiplesTest extends KernelTestBase { * * @return array */ - public function scalarAndMultipleValuesProviderSource() { + public static function scalarAndMultipleValuesProviderSource() { return [ [ 'source_data' => [ diff --git a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php index 850abf21ac8..53ebf036255 100644 --- a/core/modules/migrate/tests/src/Kernel/process/RouteTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/RouteTest.php @@ -49,7 +49,7 @@ class RouteTest extends KernelTestBase { * An array of arrays, where the first element is the input to the Route * process plugin, and the second is the expected results. */ - public function providerTestRoute() { + public static function providerTestRoute() { // Internal link tests. // Valid link path and options. $values[0] = [ @@ -214,7 +214,7 @@ class RouteTest extends KernelTestBase { * An array of arrays, where the first element is the input to the Route * process plugin, and the second is the expected results. */ - public function providerTestRouteWithParamQuery() { + public static function providerTestRouteWithParamQuery() { $values = []; $expected = []; // Valid link path with query options and parameters. diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index b984b7ae52e..773919205fa 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -510,7 +510,7 @@ class MigrateExecutableTest extends MigrateTestCase { * @return array * The test cases. */ - public function providerTestRollback() { + public static function providerTestRollback() { return [ 'Rollback delete' => [ 'ID map records' => [ diff --git a/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php b/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php index 9805916fd54..7aa4eeeca54 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateLookupTest.php @@ -66,7 +66,7 @@ class MigrateLookupTest extends MigrateTestCase { /** * Provides data for testExceptionOnMigrationNotFound. */ - public function providerExceptionOnMigrationNotFound() { + public static function providerExceptionOnMigrationNotFound() { return [ 'string' => [ 'bad_plugin', @@ -96,7 +96,7 @@ class MigrateLookupTest extends MigrateTestCase { /** * Provides data for testExceptionOnMultipleMigrationsNotFound. */ - public function providerExceptionOnMultipleMigrationsNotFound() { + public static function providerExceptionOnMultipleMigrationsNotFound() { return [ 'array two items' => [ ['foo', 'bar'], diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php index 0ba79e1aab5..49070c2edba 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php @@ -387,7 +387,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * @return array * An array of data values. */ - public function lookupDestinationIdMappingDataProvider() { + public static function lookupDestinationIdMappingDataProvider() { return [ [1, 1], [2, 2], @@ -605,7 +605,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * @return array * An array of data values. */ - public function lookupSourceIdMappingDataProvider() { + public static function lookupSourceIdMappingDataProvider() { return [ [1, 1], [2, 2], @@ -762,7 +762,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * @return array * An array of data values. */ - public function updateCountDataProvider() { + public static function updateCountDataProvider() { return [ [0], [1], @@ -810,7 +810,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * @return array * An array of data values. */ - public function errorCountDataProvider() { + public static function errorCountDataProvider() { return [ [0], [1], @@ -1096,7 +1096,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * @return array * An array of data values. */ - public function getHighestIdDataProvider() { + public static function getHighestIdDataProvider() { return [ 'Destination ID type integer' => [ 'dest_ids' => [ @@ -1161,7 +1161,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * @return array * An array of data values. */ - public function getHighestIdInvalidDataProvider() { + public static function getHighestIdInvalidDataProvider() { return [ 'Destination ID type string' => [ 'ids' => [ diff --git a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php index 223ade26c77..be4ae0ff6a6 100644 --- a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php @@ -90,7 +90,7 @@ class MigrationPluginManagerTest extends UnitTestCase { /** * Provide dependency data for testing. */ - public function dependencyProvider() { + public static function dependencyProvider() { return [ // Just one migration, with no dependencies. [ diff --git a/core/modules/migrate/tests/src/Unit/MigrationTest.php b/core/modules/migrate/tests/src/Unit/MigrationTest.php index adc40320100..bfd768b4753 100644 --- a/core/modules/migrate/tests/src/Unit/MigrationTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrationTest.php @@ -212,7 +212,7 @@ class MigrationTest extends UnitTestCase { /** * Provides data for valid migration configuration test. */ - public function getValidMigrationDependenciesProvider() { + public static function getValidMigrationDependenciesProvider() { return [ [ 'source' => NULL, @@ -240,7 +240,7 @@ class MigrationTest extends UnitTestCase { /** * Provides invalid migration dependencies. */ - public function getInvalidMigrationDependenciesProvider() { + public static function getInvalidMigrationDependenciesProvider() { return [ 'invalid key' => [ 'dependencies' => ['bogus' => []], diff --git a/core/modules/migrate/tests/src/Unit/RowTest.php b/core/modules/migrate/tests/src/Unit/RowTest.php index fe89748acdb..83b8d7689a7 100644 --- a/core/modules/migrate/tests/src/Unit/RowTest.php +++ b/core/modules/migrate/tests/src/Unit/RowTest.php @@ -333,7 +333,7 @@ class RowTest extends UnitTestCase { * @return array * The keys and expected values. */ - public function getDataProvider() { + public static function getDataProvider() { return [ ['source_key_1', 'source_value_1'], ['source_key_2', 'source_value_2'], @@ -377,7 +377,7 @@ class RowTest extends UnitTestCase { * @return array * The keys and expected values. */ - public function getMultipleDataProvider() { + public static function getMultipleDataProvider() { return [ 'Single Key' => [ 'keys' => ['source_key_1'], diff --git a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php index 0f62b7f34f7..064e64343da 100644 --- a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php +++ b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php @@ -85,7 +85,7 @@ class SqlBaseTest extends UnitTestCase { * @return array * An array of data per test run. */ - public function sqlBaseTestProvider() { + public static function sqlBaseTestProvider() { return [ // Source ids are empty so mapJoinable() is false. [ diff --git a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php index 5170c85959b..485c4eb669b 100644 --- a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php +++ b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php @@ -29,7 +29,7 @@ class CallbackTest extends MigrateProcessTestCase { /** * Data provider for ::testCallback(). */ - public function providerCallback() { + public static function providerCallback() { return [ 'function' => ['strtolower'], 'class method' => [[self::class, 'strtolower']], @@ -51,7 +51,7 @@ class CallbackTest extends MigrateProcessTestCase { /** * Data provider for ::testCallbackArray(). */ - public function providerCallbackArray() { + public static function providerCallbackArray() { return [ 'date format' => [ 'date', @@ -100,7 +100,7 @@ class CallbackTest extends MigrateProcessTestCase { /** * Data provider for ::testCallbackExceptions(). */ - public function providerCallbackExceptions() { + public static function providerCallbackExceptions() { return [ 'not set' => [ 'message' => 'The "callable" must be set.', diff --git a/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php b/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php index 3eed164eda7..d2872b7877b 100644 --- a/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php +++ b/core/modules/migrate/tests/src/Unit/process/DefaultValueTest.php @@ -32,7 +32,7 @@ class DefaultValueTest extends MigrateProcessTestCase { * * @return array */ - public function defaultValueDataProvider() { + public static function defaultValueDataProvider() { return [ 'strict_true_value_populated_array' => [ 'configuration' => [ diff --git a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php index 4eede4309f5..0a790473507 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php @@ -78,7 +78,7 @@ class ExplodeTest extends MigrateProcessTestCase { /** * Data provider for ::testExplodeWithNonStrictAndEmptySource(). */ - public function providerExplodeWithNonStrictAndEmptySource() { + public static function providerExplodeWithNonStrictAndEmptySource() { return [ 'normal_string' => ['a|b|c', ['a', 'b', 'c']], 'integer_cast_to_string' => [123, ['123']], diff --git a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php index d83ed31866a..4c44f848c64 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php @@ -84,7 +84,7 @@ class ExtractTest extends MigrateProcessTestCase { /** * Data provider for testExtractDefault. */ - public function providerExtractDefault() { + public static function providerExtractDefault() { return [ [ ['foo' => 'bar'], @@ -140,7 +140,7 @@ class ExtractTest extends MigrateProcessTestCase { /** * Provides data for the testExtractInvalid. */ - public function providerTestExtractInvalid() { + public static function providerTestExtractInvalid() { $xml_str = <<<XML <xml version='1.0'?> <authors> diff --git a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php index 62e3752247c..eeb315b2dbd 100644 --- a/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FileCopyTest.php @@ -35,7 +35,7 @@ class FileCopyTest extends MigrateProcessTestCase { /** * Data provider for testFileProcessBaseConstructor. */ - public function providerFileProcessBaseConstructor() { + public static function providerFileProcessBaseConstructor() { return [ [['file_exists' => 'replace'], FileSystemInterface::EXISTS_REPLACE], [['file_exists' => 'rename'], FileSystemInterface::EXISTS_RENAME], diff --git a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php index ff707268205..571b568d61b 100644 --- a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php @@ -35,7 +35,7 @@ class FlattenTest extends MigrateProcessTestCase { /** * Provides data for the testFlatten. */ - public function providerTestFlatten() { + public static function providerTestFlatten() { $object = (object) [ 'a' => 'test', 'b' => '1.2', @@ -68,7 +68,7 @@ class FlattenTest extends MigrateProcessTestCase { /** * Provides data for the testFlattenInvalid. */ - public function providerTestFlattenInvalid() { + public static function providerTestFlattenInvalid() { $xml_str = <<<XML <xml version='1.0'?> <authors> diff --git a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php index 7d2c1313ed8..67c917ce943 100644 --- a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php @@ -103,7 +103,7 @@ class FormatDateTest extends MigrateProcessTestCase { * @return array * Array of date formats and actual/expected values. */ - public function datesDataProvider() { + public static function datesDataProvider() { return [ 'datetime_date' => [ 'configuration' => [ diff --git a/core/modules/migrate/tests/src/Unit/process/GetTest.php b/core/modules/migrate/tests/src/Unit/process/GetTest.php index 20e7d1e9752..a1e4b976947 100644 --- a/core/modules/migrate/tests/src/Unit/process/GetTest.php +++ b/core/modules/migrate/tests/src/Unit/process/GetTest.php @@ -97,7 +97,7 @@ class GetTest extends MigrateProcessTestCase { * * @return array */ - public function integerValuesDataProvider() { + public static function integerValuesDataProvider() { return [ [ 'source' => [0 => 0, 1 => 'test'], diff --git a/core/modules/migrate/tests/src/Unit/process/LogTest.php b/core/modules/migrate/tests/src/Unit/process/LogTest.php index 13244ad1d31..fa3abf6b3eb 100644 --- a/core/modules/migrate/tests/src/Unit/process/LogTest.php +++ b/core/modules/migrate/tests/src/Unit/process/LogTest.php @@ -37,7 +37,7 @@ class LogTest extends MigrateProcessTestCase { * @return string[][] * An array of test data arrays. */ - public function providerTestLog() { + public static function providerTestLog() { $object = (object) [ 'a' => 'test', 'b' => 'test2', diff --git a/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php b/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php index eae1f1647ec..7a0f45f90db 100644 --- a/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MachineNameTest.php @@ -70,7 +70,7 @@ class MachineNameTest extends MigrateProcessTestCase { * @return array * An array of test cases. */ - public function providerTestMachineNames(): array { + public static function providerTestMachineNames(): array { return [ // Tests the following transformations: // - non-alphanumeric character (including spaces) -> underscore, diff --git a/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php b/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php index 175b9f3efa0..c73abd63812 100644 --- a/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php @@ -118,7 +118,7 @@ class MakeUniqueEntityFieldTest extends MigrateProcessTestCase { /** * Data provider for testMakeUniqueEntityField(). */ - public function providerTestMakeUniqueEntityField() { + public static function providerTestMakeUniqueEntityField() { return [ // Tests no duplication. [0], diff --git a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php index 885aaba15bf..f18ec2de752 100644 --- a/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php @@ -101,7 +101,7 @@ class MenuLinkParentTest extends MigrateProcessTestCase { /** * Provides data for testTransformException(). */ - public function providerTransformException() { + public static function providerTransformException() { // The parent ID does not for the following tests. return [ 'parent link external and could not be loaded' => [ @@ -159,7 +159,7 @@ class MenuLinkParentTest extends MigrateProcessTestCase { /** * Provides data for testMenuLinkParent(). */ - public function providerMenuLinkParent() { + public static function providerMenuLinkParent() { return [ 'menu link is route item' => [ 'source_value' => [0, NULL, NULL], diff --git a/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php b/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php index 3d2558bd916..5699e30723d 100644 --- a/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php @@ -100,7 +100,7 @@ class MigrationLookupTest extends MigrationLookupTestCase { * @return array * Empty values. */ - public function skipInvalidDataProvider() { + public static function skipInvalidDataProvider() { return [ 'Empty String' => [''], 'Boolean False' => [FALSE], @@ -144,7 +144,7 @@ class MigrationLookupTest extends MigrationLookupTestCase { * @return array * Empty values. */ - public function noSkipValidDataProvider() { + public static function noSkipValidDataProvider() { return [ 'Integer Zero' => [0], 'String Zero' => ['0'], @@ -186,7 +186,7 @@ class MigrationLookupTest extends MigrationLookupTestCase { * @return array * The data. */ - public function successfulLookupDataProvider() { + public static function successfulLookupDataProvider() { return [ // Test data for scalar to scalar. [ diff --git a/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php b/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php index d822e142a1b..765f19f7e42 100644 --- a/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php +++ b/core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php @@ -49,7 +49,7 @@ class NullCoalesceTest extends MigrateProcessTestCase { /** * Provides Data for ::testTransform. */ - public function transformDataProvider() { + public static function transformDataProvider() { return [ 'all null' => [ 'source' => [NULL, NULL, NULL], @@ -103,7 +103,7 @@ class NullCoalesceTest extends MigrateProcessTestCase { /** * Provides Data for ::testTransformWithDefault. */ - public function transformWithDefaultProvider() { + public static function transformWithDefaultProvider() { return [ 'default not used' => [ 'source' => [NULL, NULL, 'Test', 'Test 2'], diff --git a/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php b/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php index 1adbeda5ca9..64df3ddab3c 100644 --- a/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php @@ -86,7 +86,7 @@ class SubProcessTest extends MigrateProcessTestCase { /** * Data provider for testSubProcess(). */ - public function providerTestSubProcess() { + public static function providerTestSubProcess() { return [ 'no source context' => [ 'process configuration' => [ @@ -173,7 +173,7 @@ class SubProcessTest extends MigrateProcessTestCase { /** * Data provider for testNotFoundSubProcess(). */ - public function providerTestNotFoundSubProcess() { + public static function providerTestNotFoundSubProcess() { return [ 'no key' => [ 'process configuration' => [ @@ -210,7 +210,7 @@ class SubProcessTest extends MigrateProcessTestCase { /** * Data provider for testSourceNotArray(). */ - public function providerTestSourceNotArray() { + public static function providerTestSourceNotArray() { return [ 'strings cannot be subprocess items' => [ ['strings', 'cannot', 'be', 'children'], diff --git a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php index fa0db16e8a2..6ce82d60e3a 100644 --- a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php @@ -41,7 +41,7 @@ class SubstrTest extends MigrateProcessTestCase { /** * Data provider for testSubstr(). */ - public function providerTestSubstr() { + public static function providerTestSubstr() { return [ // Tests with valid start and length values. [0, 7, 'Captain'], diff --git a/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php b/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php index 7cb29c2863f..41d00eef0e2 100644 --- a/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php +++ b/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php @@ -28,7 +28,7 @@ class UrlEncodeTest extends MigrateTestCase { * @return array * An array of URLs to test. */ - public function urlDataProvider() { + public static function urlDataProvider() { return [ 'A URL with no characters requiring encoding' => ['http://example.com/normal_url.html', 'http://example.com/normal_url.html'], 'The definitive use case - encoding spaces in URLs' => ['http://example.com/url with spaces.html', 'http://example.com/url%20with%20spaces.html'], diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php index ebd4df5be0e..22028e41536 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php @@ -83,7 +83,7 @@ class MigrateFieldPluginManagerTest extends MigrateDrupalTestBase { * @return array * The data. */ - public function nonExistentPluginExceptionsData() { + public static function nonExistentPluginExceptionsData() { return [ 'D7 Filefield' => [ 'core' => 7, diff --git a/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php b/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php index 82707df9840..6873d04d3a5 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/NodeMigrationTypePluginAlterTest.php @@ -51,7 +51,7 @@ class NodeMigrationTypePluginAlterTest extends MigrateTestBase { /** * Data provider for testMigrationPluginAlter(). */ - public function providerMigrationPluginAlter() { + public static function providerMigrationPluginAlter() { $tests = []; $migrations = [ diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php index 12d2e362b3c..b3a7cfba141 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityConstructorTest.php @@ -40,7 +40,7 @@ class ContentEntityConstructorTest extends KernelTestBase { /** * Provides data for constructor tests. */ - public function providerTestConstructor() { + public static function providerTestConstructor() { return [ 'entity type missing' => [ [], diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php index 36fe385b02f..2d07b5946b6 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php @@ -431,7 +431,7 @@ class ContentEntityTest extends KernelTestBase { * @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testMediaSource * @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testTermSource */ - public function migrationConfigurationProvider() { + public static function migrationConfigurationProvider() { $data = []; foreach ([FALSE, TRUE] as $include_translations) { foreach ([FALSE, TRUE] as $add_revision_id) { diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php index 4dd90474591..39f2a0d89b5 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php @@ -23,7 +23,7 @@ class VariableMultiRowTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php index ab31ea15a77..2bcc8cc2fa9 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php @@ -21,7 +21,7 @@ class VariableTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php index 803b3af8ea1..e3a74fbb6d8 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php @@ -21,7 +21,7 @@ class VariableTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php index 3a9eb244498..4021140cd2c 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php @@ -21,7 +21,7 @@ class VariableTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php index 0cb0dcf5d84..d17d3d759d2 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php @@ -20,7 +20,7 @@ class ConfigTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $data = []; // The source database tables. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php index 58f19748a96..04ab0b51324 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php @@ -136,7 +136,7 @@ class FieldDiscoveryTest extends MigrateDrupal6TestBase { * @return array * The data. */ - public function addAllFieldProcessesAltersData() { + public static function addAllFieldProcessesAltersData() { return [ 'Field Formatter' => [ 'field_plugin_method' => 'alterFieldFormatterMigration', diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php index 12a0426a68f..e0e95ade4e7 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php @@ -180,7 +180,7 @@ class FieldDiscoveryTest extends MigrateDrupal7TestBase { * @return array * The data. */ - public function addAllFieldProcessesAltersData() { + public static function addAllFieldProcessesAltersData() { return [ 'Field Instance' => [ 'field_plugin_method' => 'alterFieldInstanceMigration', diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php index 1f0c1fd6733..5c0a518f980 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php @@ -119,7 +119,7 @@ class FollowUpMigrationsTest extends MigrateDrupal7TestBase { /** * Data provider for testEntityReferenceTranslations(). */ - public function providerTestEntityReferenceTranslations() { + public static function providerTestEntityReferenceTranslations() { return [ [ ['d7_node', 'd7_node_translation'], diff --git a/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php index 1d32387523e..9918dc4cbc4 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php @@ -79,7 +79,7 @@ class FieldDiscoveryTest extends UnitTestCase { * @return array * The data. */ - public function getEntityFieldsData() { + public static function getEntityFieldsData() { return [ 'Node' => [ 'entity_type_id' => 'node', @@ -156,7 +156,7 @@ class FieldDiscoveryTest extends UnitTestCase { * @return array * The data. */ - public function getBundleFieldsData() { + public static function getBundleFieldsData() { return [ 'Node - Content Type 1' => [ 'entity_type_id' => 'node', @@ -242,7 +242,7 @@ class FieldDiscoveryTest extends UnitTestCase { * @return array * The test data. */ - public function getCoreVersionData() { + public static function getCoreVersionData() { return [ 'Drupal 7' => [ 'tags' => ['Drupal 7'], @@ -331,7 +331,7 @@ class FieldDiscoveryTest extends UnitTestCase { * @return array * The data. */ - public function getFieldInstanceStubMigrationDefinition() { + public static function getFieldInstanceStubMigrationDefinition() { return [ 'Drupal 6' => [ 'core' => FieldDiscoveryInterface::DRUPAL_6, diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php index 75c4853e354..a5b1dd0ed88 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php @@ -51,7 +51,7 @@ class MigrateFieldPluginManagerTest extends UnitTestCase { * @return array * The data. */ - public function weightsData() { + public static function weightsData() { return [ 'Field 1, D6' => [ 'field_type' => 'field_1', diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php index 042d9c85e53..995fd63191e 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php @@ -57,7 +57,7 @@ class MigrationConfigurationTraitTest extends UnitTestCase { /** * Provides data for testGetLegacyDrupalVersion. */ - public function providerTestGetLegacyDrupalVersion() { + public static function providerTestGetLegacyDrupalVersion() { return [ 'D5' => [ 'expected_version_string' => '5', diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php index 0b3808109b5..52d5a1209be 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php @@ -91,7 +91,7 @@ class MigrationStateUnitTest extends UnitTestCase { /** * Data provider for testGetUpgradeStates. */ - public function providerGetUpgradeStates() { + public static function providerGetUpgradeStates() { // Tests multiple scenarios: // Not enabled and not declared. diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php index 8ce8b03e2ac..e18e8fbfe50 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php @@ -133,7 +133,7 @@ class DrupalSqlBaseTest extends MigrateTestCase { /** * Provides data for testMinimumVersion. */ - public function providerMinimumVersion() { + public static function providerMinimumVersion() { return [ 'minimum less than schema' => [ TRUE, diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php index 275efc0a1a3..2f76cef3741 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php @@ -77,7 +77,7 @@ class CredentialFormTest extends MigrateUpgradeTestBase { /** * Data provider for testCredentialForm. */ - public function providerCredentialForm() { + public static function providerCredentialForm() { return [ [ 'path_to_database' => '/tests/fixtures/drupal6.php', diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php index d70bdb15668..ae4ecc186e3 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/SourceProviderTest.php @@ -55,7 +55,7 @@ class SourceProviderTest extends MigrateUpgradeTestBase { /** * Data provider for testSourceProvider. */ - public function providerSourceProvider() { + public static function providerSourceProvider() { return [ [ 'path_to_database' => '/tests/fixtures/drupal6.php', diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php index 80a3c9cbf70..4df342f58a6 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php @@ -165,7 +165,7 @@ class FilePathTest extends MigrateUpgradeTestBase { * @return string[][] * An array of test data. */ - public function providerTestFilePath() { + public static function providerTestFilePath() { return [ 'All source base paths are at temporary' => [ 'sites/default/private', diff --git a/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php b/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php index 7ae0a1951c0..796de8ce159 100644 --- a/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php @@ -141,7 +141,7 @@ class SettingsTest extends WebDriverTestBase { /** * Data provider for testCredentialForm. */ - public function providerTestCredentialForm() { + public static function providerTestCredentialForm() { return [ 'no values in settings.php' => [ 'source_connection' => "", diff --git a/core/modules/mysql/tests/src/Unit/ConnectionTest.php b/core/modules/mysql/tests/src/Unit/ConnectionTest.php index a3c0f50f064..80104ab2b97 100644 --- a/core/modules/mysql/tests/src/Unit/ConnectionTest.php +++ b/core/modules/mysql/tests/src/Unit/ConnectionTest.php @@ -99,7 +99,7 @@ class ConnectionTest extends UnitTestCase { * * @return array */ - public function providerVersionAndIsMariaDb(): array { + public static function providerVersionAndIsMariaDb(): array { return [ // MariaDB. [ diff --git a/core/modules/mysql/tests/src/Unit/InstallTasksTest.php b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php index 0abcef6e6b9..552c7240ae4 100644 --- a/core/modules/mysql/tests/src/Unit/InstallTasksTest.php +++ b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php @@ -112,7 +112,7 @@ class InstallTasksTest extends UnitTestCase { * * @return array */ - public function providerNameAndMinimumVersion(): array { + public static function providerNameAndMinimumVersion(): array { return [ [ TRUE, diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php index e8e466806c3..163bfc5ce10 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php @@ -23,7 +23,7 @@ class NodeByNodeTypeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php index 2829c6a6560..2acd8839658 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionByNodeTypeTest.php @@ -23,7 +23,7 @@ class NodeRevisionByNodeTypeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php index 770f5142edb..114baf6726a 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeRevisionTest.php @@ -23,7 +23,7 @@ class NodeRevisionTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php index 44b93d255f9..6ee22aeb4da 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTest.php @@ -23,7 +23,7 @@ class NodeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php index 732d540d2cf..9ab02f34ebc 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTranslationTest.php @@ -21,7 +21,7 @@ class NodeTranslationTest extends NodeTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // Get the source data from parent. $tests = parent::providerSource(); diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php index bd349c6113c..1ca146017a3 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeTypeTest.php @@ -21,7 +21,7 @@ class NodeTypeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php index e818cbee000..e36899b6241 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/ViewModeTest.php @@ -21,7 +21,7 @@ class ViewModeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php index c1658b8efe7..bb14427419b 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeEntityTranslationTest.php @@ -23,7 +23,7 @@ class NodeEntityTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php index 760b275a6c8..481ae900d10 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTest.php @@ -23,7 +23,7 @@ class NodeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // Test retrieval of article and page content types when configuration diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php index 590ec76a8bc..4e77be438d9 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTranslationTest.php @@ -21,7 +21,7 @@ class NodeTranslationTest extends NodeTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // Get the source data from parent. $tests = parent::providerSource(); diff --git a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php index 45f054110af..4b895090123 100644 --- a/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php +++ b/core/modules/node/tests/src/Kernel/Plugin/migrate/source/d7/NodeTypeTest.php @@ -21,7 +21,7 @@ class NodeTypeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php b/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php index d09572235f3..6e094dfa505 100644 --- a/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php +++ b/core/modules/node/tests/src/Unit/NodeOperationAccessTest.php @@ -129,7 +129,7 @@ class NodeOperationAccessTest extends UnitTestCase { * @return array * Data for testing. */ - public function providerTestRevisionOperations() { + public static function providerTestRevisionOperations() { $data = []; // Tests 'bypass node access' never works on revision operations. diff --git a/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php b/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php index 4e58aa7b59f..9234489298e 100644 --- a/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php +++ b/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php @@ -77,7 +77,7 @@ class DenyNodePreviewTest extends UnitTestCase { * @return array * Data and expected results. */ - public function providerPrivateImageStyleDownloadPolicy() { + public static function providerPrivateImageStyleDownloadPolicy() { return [ [ResponsePolicyInterface::DENY, 'entity.node.preview'], [NULL, 'some.other.route'], diff --git a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php index 61df5dd91af..0e09410257e 100644 --- a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php +++ b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php @@ -340,7 +340,7 @@ JS; * - The method which should be used to add another row to the table. The * possible values are 'Press button', 'Enter button' or 'Enter element'. */ - public function providerTestOptionsAllowedValues() { + public static function providerTestOptionsAllowedValues() { $type_cases = [ 'List integer' => [ 'list_integer', diff --git a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php index 4cfe6d12268..1ce15b47417 100644 --- a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php +++ b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php @@ -20,7 +20,7 @@ class UrlAliasTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php index 191b0794d96..b0db55a3175 100644 --- a/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php +++ b/core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php @@ -20,7 +20,7 @@ class UrlAliasTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php b/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php index 7f234ec6b3b..03ece19d9d8 100644 --- a/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php +++ b/core/modules/path/tests/src/Unit/migrate/process/PathSetTranslatedTest.php @@ -40,7 +40,7 @@ class PathSetTranslatedTest extends MigrateProcessTestCase { * @return array * The data. */ - public function transformDataProvider() { + public static function transformDataProvider() { return [ 'non-node-path' => [ 'path' => '/non-node-path', diff --git a/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php b/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php index d0789615701..12ab0711dc5 100644 --- a/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php +++ b/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php @@ -83,7 +83,7 @@ class AliasPathProcessorTest extends UnitTestCase { /** * @return array */ - public function providerTestProcessOutbound() { + public static function providerTestProcessOutbound() { return [ ['internal-url', [], 'url-alias'], ['internal-url', ['alias' => TRUE], 'internal-url'], diff --git a/core/modules/pgsql/tests/src/Unit/SchemaTest.php b/core/modules/pgsql/tests/src/Unit/SchemaTest.php index 40317a9fa17..1514d1a14ad 100644 --- a/core/modules/pgsql/tests/src/Unit/SchemaTest.php +++ b/core/modules/pgsql/tests/src/Unit/SchemaTest.php @@ -49,7 +49,7 @@ class SchemaTest extends UnitTestCase { /** * Data provider for ::testComputedConstraintName(). */ - public function providerComputedConstraintName() { + public static function providerComputedConstraintName() { return [ ['user_field_data', 'pkey', 'user_field_data____pkey'], ['user_field_data', 'name__key', 'user_field_data__name__key'], diff --git a/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php b/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php index 92ff768a5ed..3bb25198750 100644 --- a/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php +++ b/core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php @@ -143,7 +143,7 @@ class PasswordVerifyTest extends UnitTestCase { /** * Provides the test matrix for testLongPassword(). */ - public function providerLongPasswords() { + public static function providerLongPasswords() { // '512 byte long password is allowed.' $passwords['allowed'] = [str_repeat('x', PasswordInterface::PASSWORD_MAX_LENGTH), TRUE]; // 513 byte long password is not allowed. diff --git a/core/modules/responsive_image/tests/src/Kernel/Plugin/migrate/source/d7/ResponsiveImageStylesTest.php b/core/modules/responsive_image/tests/src/Kernel/Plugin/migrate/source/d7/ResponsiveImageStylesTest.php index b89b4b435ad..d87783a3f57 100644 --- a/core/modules/responsive_image/tests/src/Kernel/Plugin/migrate/source/d7/ResponsiveImageStylesTest.php +++ b/core/modules/responsive_image/tests/src/Kernel/Plugin/migrate/source/d7/ResponsiveImageStylesTest.php @@ -23,7 +23,7 @@ class ResponsiveImageStylesTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php index e854cb71cc0..ffd7bc7f849 100644 --- a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php +++ b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php @@ -56,7 +56,7 @@ class ConfigDependenciesTest extends KernelTestBase { * An array with numerical keys: * 0. The original REST resource configuration. */ - public function providerBasicDependencies() { + public static function providerBasicDependencies() { return [ 'method' => [ [ @@ -151,7 +151,7 @@ class ConfigDependenciesTest extends KernelTestBase { * 1. The module to uninstall (the dependency that is about to be removed). * 2. The expected configuration after uninstalling this module. */ - public function providerOnDependencyRemovalForResourceGranularity() { + public static function providerOnDependencyRemovalForResourceGranularity() { return [ 'resource with multiple formats' => [ [ diff --git a/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php b/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php index 6234c72b7a5..f51ff6e4e9a 100644 --- a/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php +++ b/core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php @@ -53,7 +53,7 @@ class ResourceResponseSubscriberTest extends UnitTestCase { $this->assertEquals($expected_response !== FALSE ? $expected_response : Json::encode($data), $event->getResponse()->getContent()); } - public function providerTestSerialization() { + public static function providerTestSerialization() { return [ // The default data for \Drupal\rest\ResourceResponse. 'default' => [NULL, ''], @@ -218,7 +218,7 @@ class ResourceResponseSubscriberTest extends UnitTestCase { * 6. expected response content type * 7. expected response body */ - public function providerTestResponseFormat() { + public static function providerTestResponseFormat() { $json_encoded = Json::encode(['REST' => 'Drupal']); $xml_encoded = "<?xml version=\"1.0\"?>\n<response><REST>Drupal</REST></response>\n"; diff --git a/core/modules/sdc/tests/src/Unit/ComponentMetadataTest.php b/core/modules/sdc/tests/src/Unit/ComponentMetadataTest.php index 3b1f439a2fd..d486eda26b6 100644 --- a/core/modules/sdc/tests/src/Unit/ComponentMetadataTest.php +++ b/core/modules/sdc/tests/src/Unit/ComponentMetadataTest.php @@ -54,7 +54,7 @@ final class ComponentMetadataTest extends UnitTestCaseTest { * @return array[] * The batches of data. */ - public function dataProviderMetadata(): array { + public static function dataProviderMetadata(): array { return [ 'minimal example without schemas' => [ [ diff --git a/core/modules/sdc/tests/src/Unit/SchemaCompatibilityCheckerTest.php b/core/modules/sdc/tests/src/Unit/SchemaCompatibilityCheckerTest.php index 142c7939c45..7f542b209ef 100644 --- a/core/modules/sdc/tests/src/Unit/SchemaCompatibilityCheckerTest.php +++ b/core/modules/sdc/tests/src/Unit/SchemaCompatibilityCheckerTest.php @@ -50,7 +50,7 @@ final class SchemaCompatibilityCheckerTest extends UnitTestCase { * @return array[] * The batches of data. */ - public function dataProviderIsCompatible(): array { + public static function dataProviderIsCompatible(): array { $schema = [ 'type' => 'object', 'required' => ['text'], diff --git a/core/modules/sdc/tests/src/Unit/UtilitiesTest.php b/core/modules/sdc/tests/src/Unit/UtilitiesTest.php index 04cd8f7d2cc..ce10ba88065 100644 --- a/core/modules/sdc/tests/src/Unit/UtilitiesTest.php +++ b/core/modules/sdc/tests/src/Unit/UtilitiesTest.php @@ -27,7 +27,7 @@ final class UtilitiesTest extends TestCase { ); } - public function dataProviderIsRenderArray() { + public static function dataProviderIsRenderArray() { return [ 'valid markup render array' => [['#markup' => 'hello world'], TRUE], 'invalid "foo" string' => [['foo', '#markup' => 'hello world'], FALSE], diff --git a/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php index 42eb9f6bf7b..f72dc063547 100644 --- a/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php +++ b/core/modules/search/tests/src/Kernel/Migrate/d6/SearchPageTest.php @@ -20,7 +20,7 @@ class SearchPageTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests[0]['source_data'] = [ 'variable' => [ [ diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php index 24f040d834e..5c6bdea9904 100644 --- a/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php +++ b/core/modules/search/tests/src/Kernel/Migrate/d7/SearchPageTest.php @@ -20,7 +20,7 @@ class SearchPageTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests[0]['source_data'] = [ 'variable' => [ [ diff --git a/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php b/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php index 0eb95961e05..8726d9bd0da 100644 --- a/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php +++ b/core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php @@ -213,7 +213,7 @@ class FieldItemSerializationTest extends NormalizerTestBase { * @return array * Test cases. */ - public function providerTestCustomBooleanNormalization() { + public static function providerTestCustomBooleanNormalization() { return [ 'Format-agnostic @FieldType-level normalizers SHOULD be able to affect the format-agnostic normalization' => [ ['test_fieldtype_boolean_emoji_normalizer'], diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php index 4676ea218b0..a3e41b71a0f 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php @@ -153,7 +153,7 @@ class DateTimeIso8601NormalizerTest extends UnitTestCase { * * @return array */ - public function providerTestNormalize() { + public static function providerTestNormalize() { return [ // @see \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::DATETIME_TYPE_DATE 'datetime field, configured to store only date: must be handled by DateTimeIso8601Normalizer' => [ @@ -197,7 +197,7 @@ class DateTimeIso8601NormalizerTest extends UnitTestCase { * * @return array */ - public function providerTestDenormalizeValidFormats() { + public static function providerTestDenormalizeValidFormats() { $data = []; $data['just a date'] = ['date-only', '2016-11-06', '2016-11-06']; diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php index c229ee6f56b..72cbcf1928b 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php @@ -121,7 +121,7 @@ class DateTimeNormalizerTest extends UnitTestCase { * * @return array */ - public function providerTestDenormalizeValidFormats() { + public static function providerTestDenormalizeValidFormats() { $data = []; $data['RFC3339'] = ['2016-11-06T09:02:00+00:00', new \DateTimeImmutable('2016-11-06T09:02:00+00:00')]; @@ -152,7 +152,7 @@ class DateTimeNormalizerTest extends UnitTestCase { * * @return array */ - public function providerTestDenormalizeUserFormats() { + public static function providerTestDenormalizeUserFormats() { $data = []; $data['Y/m/d H:i:s P'] = ['2016/11/06 09:02:00 +00:00', 'Y/m/d H:i:s P', new \DateTimeImmutable('2016-11-06T09:02:00+00:00')]; diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php index c07224e4f1c..f4ed459598c 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php @@ -41,7 +41,7 @@ class NormalizerBaseTest extends UnitTestCase { * @return array * An array of provider data for testSupportsNormalization. */ - public function providerTestSupportsNormalization() { + public static function providerTestSupportsNormalization() { return [ // Something that is not an object should return FALSE immediately. [FALSE, []], diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php index c32bbf8adf0..f7107fecfcf 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php @@ -60,7 +60,7 @@ class PrimitiveDataNormalizerTest extends UnitTestCase { /** * Data provider for testNormalize(). */ - public function dataProviderPrimitiveData() { + public static function dataProviderPrimitiveData() { $data = []; $definition = DataDefinition::createFromDataType('string'); diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php index 2023a4d8c70..f64f9c8e010 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php @@ -101,7 +101,7 @@ class TimestampNormalizerTest extends UnitTestCase { * * @return array */ - public function providerTestDenormalizeValidFormats() { + public static function providerTestDenormalizeValidFormats() { $expected_stamp = 1478422920; $data = []; diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php index 302f80dbe65..685f4e673c1 100644 --- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php +++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php @@ -21,7 +21,7 @@ class ShortcutSetTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php index 5dc83f79ef9..de8ca9822d9 100644 --- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php +++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php @@ -21,7 +21,7 @@ class ShortcutSetUsersTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php index afd1e1d9651..adebced8ad4 100644 --- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php +++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php @@ -21,7 +21,7 @@ class ShortcutTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php index ea8e975c7a0..a95d723f798 100644 --- a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php +++ b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php @@ -48,7 +48,7 @@ class ShortcutLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getShortcutPageRoutes() { + public static function getShortcutPageRoutes() { return [ ['entity.user.canonical'], ['entity.user.edit_form'], diff --git a/core/modules/sqlite/tests/src/Unit/ConnectionTest.php b/core/modules/sqlite/tests/src/Unit/ConnectionTest.php index 37e3062d5e2..28ae34ab925 100644 --- a/core/modules/sqlite/tests/src/Unit/ConnectionTest.php +++ b/core/modules/sqlite/tests/src/Unit/ConnectionTest.php @@ -39,7 +39,7 @@ class ConnectionTest extends UnitTestCase { * - SQLite database URL * - Expected database connection option */ - public function providerCreateConnectionOptionsFromUrl(): array { + public static function providerCreateConnectionOptionsFromUrl(): array { $root = dirname(__DIR__, 8); return [ 'sqlite relative path' => ['sqlite://localhost/tmp/test', $root . '/tmp/test'], diff --git a/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php b/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php index f2a64c44161..f726df79168 100644 --- a/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php +++ b/core/modules/statistics/tests/src/Kernel/Plugin/migrate/source/NodeCounterTest.php @@ -21,7 +21,7 @@ class NodeCounterTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/statistics/tests/src/Unit/StatisticsViewsResultTest.php b/core/modules/statistics/tests/src/Unit/StatisticsViewsResultTest.php index c811fcfd3d4..d7cd9a4eb77 100644 --- a/core/modules/statistics/tests/src/Unit/StatisticsViewsResultTest.php +++ b/core/modules/statistics/tests/src/Unit/StatisticsViewsResultTest.php @@ -27,7 +27,7 @@ class StatisticsViewsResultTest extends UnitTestCase { $this->assertSame((int) $timestamp, $statistics->getTimestamp()); } - public function providerTestStatisticsCount() { + public static function providerTestStatisticsCount() { return [ [2, 0, 1421727536], [1, 0, 1471428059], diff --git a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php index 9bd6c2ec63a..cb646e0b55c 100644 --- a/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php +++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php @@ -183,7 +183,7 @@ class EntityTestTextItemNormalizerTest extends EntityTestResourceTestBase { $this->assertEqualsCanonicalizing($expected_cache_tags, explode(' ', $response->getHeader('X-Drupal-Cache-Tags')[0])); } - public function providerTestGetWithFormat() { + public static function providerTestGetWithFormat() { return [ 'format specified (different from fallback format)' => [ 'pablo', diff --git a/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php b/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php index ab2e482b27f..732ffd004c6 100644 --- a/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php +++ b/core/modules/system/tests/src/Functional/Datetime/TimeZoneAbbreviationRouteTest.php @@ -64,7 +64,7 @@ class TimeZoneAbbreviationRouteTest extends BrowserTestBase { * @return array * Test scenarios. */ - public function providerAbbreviationConversion() { + public static function providerAbbreviationConversion() { return [ 'valid, default offset' => [ 'CST/0/0', diff --git a/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php b/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php index f7ea323cc98..ee7f0811085 100644 --- a/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ThemeUiTest.php @@ -211,7 +211,7 @@ class ThemeUiTest extends BrowserTestBase { * An array of arrays. Details on the specific elements can be found in the * function body. */ - public function providerTestThemeInstallWithModuleDependencies() { + public static function providerTestThemeInstallWithModuleDependencies() { // Data provider values with the following keys: // -'theme_name': The name of the theme being tested. // -'first_modules': Array of module machine names to enable first. diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php index bf426a83ad3..89340c0ca21 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php @@ -277,7 +277,7 @@ class UpdateScriptTest extends BrowserTestBase { /** * Date provider for testExtensionCompatibilityChange(). */ - public function providerExtensionCompatibilityChange() { + public static function providerExtensionCompatibilityChange() { $incompatible_module_message = "The following module is installed, but it is incompatible with Drupal " . \Drupal::VERSION . ":"; $incompatible_theme_message = "The following theme is installed, but it is incompatible with Drupal " . \Drupal::VERSION . ":"; return [ @@ -551,7 +551,7 @@ class UpdateScriptTest extends BrowserTestBase { * @return array[] * Set of test cases to pass to the test method. */ - public function providerMissingExtension(): array { + public static function providerMissingExtension(): array { return [ 'core only' => [ 'core' => [ diff --git a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php index 8ad55fce4db..0b8da7ad444 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php @@ -75,7 +75,7 @@ class ThemeSettingsFormTest extends WebDriverTestBase { /** * Provides test data for ::testFormSettingsSubmissionHandler(). */ - public function providerTestFormSettingsSubmissionHandler() { + public static function providerTestFormSettingsSubmissionHandler() { return [ 'test theme.theme' => ['test_theme_theme'], 'test theme-settings.php' => ['test_theme_settings'], diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php index a09d42b4021..ccbbb8bc0fc 100644 --- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php +++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php @@ -314,7 +314,7 @@ class SystemMenuBlockTest extends KernelTestBase { /** * @return array */ - public function configExpandedTestCases() { + public static function configExpandedTestCases() { return [ 'All levels' => [ 'example5', diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php index d63f44fccb1..e4cb0506e3f 100644 --- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php @@ -80,7 +80,7 @@ class DateFormatAccessControlHandlerTest extends KernelTestBase { static::assertEquals($create_access_result, $this->accessControlHandler->createAccess(NULL, $user, [], TRUE)); } - public function testAccessProvider() { + public static function testAccessProvider() { $c = new ContainerBuilder(); $cache_contexts_manager = (new Prophet())->prophesize(CacheContextsManager::class); $cache_contexts_manager->assertValidTokens()->willReturn(TRUE); diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php index 254273c2e64..d9be4d2a1e0 100644 --- a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php +++ b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php @@ -141,7 +141,7 @@ class EntityReferenceSelectionReferenceableTest extends KernelTestBase { * * @return array[] */ - public function providerTestCases() { + public static function providerTestCases() { return [ // All referenceables, no limit. Expecting 9 items. [NULL, 'CONTAINS', 0, 9, static::$labels, 9], diff --git a/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php b/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php index 3942882d40f..6e2b9e094ba 100644 --- a/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php +++ b/core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php @@ -48,7 +48,7 @@ class InstallTranslationFilePatternTest extends KernelTestBase { /** * @return array */ - public function providerValidTranslationFiles() { + public static function providerValidTranslationFiles() { return [ ['hu', 'drupal-8.0.0-alpha1.hu.po'], ['ta', 'drupal-8.10.10-beta12.ta.po'], @@ -67,7 +67,7 @@ class InstallTranslationFilePatternTest extends KernelTestBase { /** * @return array */ - public function providerInvalidTranslationFiles() { + public static function providerInvalidTranslationFiles() { return [ ['hu', 'drupal-alpha1-*-hu.po'], ['ta', 'drupal-beta12.ta'], diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ActionTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ActionTest.php index 69e47096eb7..c2738b13359 100644 --- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ActionTest.php +++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ActionTest.php @@ -20,7 +20,7 @@ class ActionTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0][0]['actions'] = [ diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php index 64251b7107c..741a25ff35c 100644 --- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php +++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php @@ -20,7 +20,7 @@ class ExtensionTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = []; $test[0]['source_data']['system'] = [ diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php index 0dc4082df72..806a77882ed 100644 --- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php +++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php @@ -21,7 +21,7 @@ class MenuTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/MenuTranslationTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/MenuTranslationTest.php index 7e829acab79..9b8fbe54919 100644 --- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/MenuTranslationTest.php +++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/MenuTranslationTest.php @@ -22,7 +22,7 @@ class MenuTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; $tests[0]['source_data']['menu_custom'] = [ [ diff --git a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php index 8aa69be39d7..ee139531531 100644 --- a/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php +++ b/core/modules/system/tests/src/Kernel/Plugin/migrate/source/d7/ThemeSettingsTest.php @@ -21,7 +21,7 @@ class ThemeSettingsTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php b/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php index 84172eb4b74..316889ef95e 100644 --- a/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php +++ b/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php @@ -89,7 +89,7 @@ class SecurityAdvisoriesFetcherTest extends KernelTestBase implements LoggerInte /** * Data provider for testShowAdvisories(). */ - public function providerShowAdvisories(): array { + public static function providerShowAdvisories(): array { return [ 'contrib:exact:non-psa' => [ 'feed_item' => [ @@ -257,7 +257,7 @@ class SecurityAdvisoriesFetcherTest extends KernelTestBase implements LoggerInte /** * Data provider for testIgnoreAdvisories(). */ - public function providerIgnoreAdvisories(): array { + public static function providerIgnoreAdvisories(): array { return [ 'contrib:not-exact:non-psa' => [ 'feed_item' => [ diff --git a/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php b/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php index a27944c418b..d0fc897a117 100644 --- a/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php +++ b/core/modules/system/tests/src/Unit/Breadcrumbs/PathBasedBreadcrumbBuilderTest.php @@ -300,7 +300,7 @@ class PathBasedBreadcrumbBuilderTest extends UnitTestCase { * * @see \Drupal\Tests\system\Unit\Breadcrumbs\PathBasedBreadcrumbBuilderTest::testBuildWithException() */ - public function providerTestBuildWithException() { + public static function providerTestBuildWithException() { return [ ['Drupal\Core\ParamConverter\ParamNotConvertedException', ''], ['Symfony\Component\Routing\Exception\MethodNotAllowedException', []], diff --git a/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php b/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php index f2c8ba39096..b014da5019c 100644 --- a/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php +++ b/core/modules/system/tests/src/Unit/Event/SecurityFileUploadEventSubscriberTest.php @@ -72,7 +72,7 @@ class SecurityFileUploadEventSubscriberTest extends UnitTestCase { * Arrays with original name, allowed extensions, expected name and * (optional) expected name 'allow_insecure_uploads' is set to TRUE. */ - public function provideFilenames() { + public static function provideFilenames() { return [ 'All extensions allowed filename not munged' => ['foo.txt', '', 'foo.txt'], 'All extensions allowed with .php file' => ['foo.php', '', 'foo.php_.txt', 'foo.php'], @@ -142,7 +142,7 @@ class SecurityFileUploadEventSubscriberTest extends UnitTestCase { * @return array * Arrays with original name and allowed extensions. */ - public function provideFilenamesNoMunge() { + public static function provideFilenamesNoMunge() { return [ // The following filename would be rejected by 'FileExtension' constraint // and therefore remains unchanged. diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php index d736e39aa0b..e8e0871e472 100644 --- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php +++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php @@ -115,7 +115,7 @@ class MenuLinkTreeTest extends UnitTestCase { * * @see testBuildCacheability */ - public function providerTestBuildCacheability() { + public static function providerTestBuildCacheability() { $base_expected_build_empty = [ '#cache' => [ 'contexts' => [], diff --git a/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php b/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php index df7f74162d9..11564a2aca3 100644 --- a/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php +++ b/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php @@ -76,7 +76,7 @@ class SystemLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getSystemAdminRoutes() { + public static function getSystemAdminRoutes() { return [ ['system.admin_content', [['system.admin_content']]], [ diff --git a/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php b/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php index 11734671382..a2a0a03f98a 100644 --- a/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php +++ b/core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php @@ -30,7 +30,7 @@ class AdminRouteSubscriberTest extends UnitTestCase { $this->assertSame($is_admin, $route->getOption('_admin_route')); } - public function providerTestAlterRoutes() { + public static function providerTestAlterRoutes() { $data = []; $data['non-admin'] = [ new Route('/foo'), diff --git a/core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php b/core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php index 13c63ded209..a849b092382 100644 --- a/core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php +++ b/core/modules/system/tests/src/Unit/SecurityAdvisories/SecurityAdvisoryTest.php @@ -47,7 +47,7 @@ class SecurityAdvisoryTest extends UnitTestCase { /** * Data provider for testCreateFromArray(). */ - public function providerCreateFromArray(): array { + public static function providerCreateFromArray(): array { return [ // For 'is_psa' the return value should converted to any array. [ @@ -110,7 +110,7 @@ class SecurityAdvisoryTest extends UnitTestCase { /** * Data provider for testCreateFromArrayMissingField(). */ - public function providerCreateFromArrayMissingField(): array { + public static function providerCreateFromArrayMissingField(): array { return [ 'title' => ['title'], 'link' => ['link'], @@ -148,7 +148,7 @@ class SecurityAdvisoryTest extends UnitTestCase { /** * Data provider for testCreateFromArrayInvalidField(). */ - public function providerCreateFromArrayInvalidField(): array { + public static function providerCreateFromArrayInvalidField(): array { return [ 'title' => ['title', 'This value should be of type string.'], 'link' => ['link', 'This value should be of type string.'], diff --git a/core/modules/system/tests/src/Unit/Transliteration/MachineNameControllerTest.php b/core/modules/system/tests/src/Unit/Transliteration/MachineNameControllerTest.php index 3fb6283db19..b1608e62012 100644 --- a/core/modules/system/tests/src/Unit/Transliteration/MachineNameControllerTest.php +++ b/core/modules/system/tests/src/Unit/Transliteration/MachineNameControllerTest.php @@ -59,7 +59,7 @@ class MachineNameControllerTest extends UnitTestCase { * - An array of request parameters. * - The expected content of the JSONresponse. */ - public function providerTestMachineNameController() { + public static function providerTestMachineNameController() { // cspell:ignore äwesome $valid_data = [ [['text' => 'Bob', 'langcode' => 'en'], '"Bob"'], diff --git a/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php b/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php index c4f195078eb..614ddc5513d 100644 --- a/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php +++ b/core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php @@ -356,7 +356,7 @@ abstract class TermResourceTestBase extends EntityResourceTestBase { $this->assertSame($expected, $actual); } - public function providerTestGetTermWithParent() { + public static function providerTestGetTermWithParent() { return [ 'root parent: [0] (= no parent)' => [ [0], diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php index b169ecd9c73..3da74ac5001 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php @@ -22,7 +22,7 @@ class TermLocalizedTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php index 8bda23593be..34e6f787a7d 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermNodeTest.php @@ -22,7 +22,7 @@ class TermNodeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php index bb60f9c4b9f..68a6d19767c 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermSourceWithVocabularyFilterTest.php @@ -18,7 +18,7 @@ class TermSourceWithVocabularyFilterTest extends TermTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // Get the source data from parent. $tests = parent::providerSource(); diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php index c0b50cb0f67..6185fa702dd 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTest.php @@ -20,7 +20,7 @@ class TermTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php index cafbc813b95..6217a69a228 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermTranslationTest.php @@ -20,7 +20,7 @@ class TermTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php index bce46846d43..21e366a8e43 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyPerTypeTest.php @@ -21,7 +21,7 @@ class VocabularyPerTypeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php index 4b81b6c3fb8..5ec4cad91c6 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTest.php @@ -21,7 +21,7 @@ class VocabularyTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php index cabe970f247..5049380d0a0 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/VocabularyTranslationTest.php @@ -22,7 +22,7 @@ class VocabularyTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php index 9cb061d1989..89c175d617d 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermEntityTranslationTest.php @@ -20,7 +20,7 @@ class TermEntityTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php index 1447eda0b51..5a19f74d307 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermLocalizedTranslationTest.php @@ -20,7 +20,7 @@ class TermLocalizedTranslationTest extends TermTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = parent::providerSource(); for ($i = 1; $i < 4; $i++) { diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php index 274d586d741..13b078f2be8 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermSourceWithVocabularyFilterTest.php @@ -18,7 +18,7 @@ class TermSourceWithVocabularyFilterTest extends TermTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { // Get the source data from parent. $tests = parent::providerSource(); diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php index 8ee71dfcc21..072911b70c1 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTest.php @@ -20,7 +20,7 @@ class TermTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTranslationTest.php index 9e37649da85..36baca6101f 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/TermTranslationTest.php @@ -20,7 +20,7 @@ class TermTranslationTest extends TermTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // Ignore i18_modes 0 and 1, get i18n_mode 4. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php index fb78c547d73..9b38b782ee8 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTest.php @@ -20,7 +20,7 @@ class VocabularyTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php index f013a59c034..9604cad26e8 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php @@ -22,7 +22,7 @@ class VocabularyTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php index 7635b266d78..dc6799c960a 100644 --- a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php +++ b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php @@ -39,7 +39,7 @@ class TaxonomyLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getTaxonomyPageRoutes() { + public static function getTaxonomyPageRoutes() { return [ ['entity.taxonomy_term.canonical'], ['entity.taxonomy_term.edit_form'], diff --git a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php index 6ef20bc9f06..3bc8400195e 100644 --- a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php +++ b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php @@ -117,7 +117,7 @@ class TelephoneFieldTest extends BrowserTestBase { /** * Provides the phone numbers to check and expected results. */ - public function providerPhoneNumbers() { + public static function providerPhoneNumbers() { return [ 'standard phone number' => ['123456789', '123456789'], 'whitespace is removed' => ['1234 56789', '123456789'], diff --git a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php index d3c17673e0c..676e9c5d395 100644 --- a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php +++ b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php @@ -44,7 +44,7 @@ class TextItemBaseTest extends KernelTestBase { /** * Data provider for testTextFieldSampleValue. */ - public function providerTextFieldSampleValue() { + public static function providerTextFieldSampleValue() { return [ [ 1, diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php index 2787a99d132..644e4d4457f 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php @@ -126,7 +126,7 @@ class TextFieldTest extends UnitTestCase { /** * Data provider for testGetFieldType(). */ - public function getFieldTypeProvider() { + public static function getFieldTypeProvider() { return [ ['string_long', 'text_textfield', ['text_processing' => FALSE]], ['string', 'text_textfield', [ diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php index 0bae0bec644..78cb15b86ff 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php @@ -31,7 +31,7 @@ class TextFieldTest extends UnitTestCase { /** * Data provider for testGetFieldFormatterType(). */ - public function getFieldFormatterTypeProvider() { + public static function getFieldFormatterTypeProvider() { return [ ['text', 'text_plain', 'string'], ['text_long', 'text_default', 'basic_string'], diff --git a/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php b/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php index a11a1bd66ad..0b91bc2be86 100644 --- a/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php +++ b/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php @@ -49,7 +49,7 @@ class AllowToolbarPathTest extends UnitTestCase { * @return array * Data and expected results. */ - public function providerTestAllowToolbarPath() { + public static function providerTestAllowToolbarPath() { return [ [NULL, '/'], [NULL, '/other-path?q=/toolbar/subtrees/'], diff --git a/core/modules/tour/tests/src/Unit/Entity/TourTest.php b/core/modules/tour/tests/src/Unit/Entity/TourTest.php index ff398e28670..7644ddabf09 100644 --- a/core/modules/tour/tests/src/Unit/Entity/TourTest.php +++ b/core/modules/tour/tests/src/Unit/Entity/TourTest.php @@ -46,7 +46,7 @@ class TourTest extends UnitTestCase { /** * Provides sample routes for testing. */ - public function routeProvider() { + public static function routeProvider() { return [ // Simple match. [ diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php index 3762d9d125d..cde23b60e7e 100644 --- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php +++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php @@ -22,7 +22,7 @@ class TrackerNodeTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php index acef8b98cf4..02f5e81c76b 100644 --- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php +++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php @@ -22,7 +22,7 @@ class TrackerUserTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php index 3da6d527fb4..88ce412ea8d 100644 --- a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php +++ b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php @@ -78,7 +78,7 @@ class FileTransferAuthorizeFormTest extends UpdateUploaderTestBase { * * Each of these release URLs has been cached in the setUp() method. */ - public function archiveFileUrlProvider() { + public static function archiveFileUrlProvider() { return [ 'tar.gz' => [ 'url' => 'https://ftp.drupal.org/files/projects/update_test_new_module.tar.gz', diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php index aa753e74684..49eac1ca6ae 100644 --- a/core/modules/update/tests/src/Functional/UpdateContribTest.php +++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php @@ -643,7 +643,7 @@ class UpdateContribTest extends UpdateTestBase { * - 8.x-1.1 * - 8.x-1.0 */ - public function securityUpdateAvailabilityProvider() { + public static function securityUpdateAvailabilityProvider() { return [ // Security releases available for module major release 1. // No releases for next major. diff --git a/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php b/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php index f549e284915..fdaf78f85f7 100644 --- a/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php +++ b/core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php @@ -93,7 +93,7 @@ class UpdateManagerUpdateTest extends UpdateTestBase { * @return array[] * Test data. */ - public function incompatibleUpdatesTableProvider() { + public static function incompatibleUpdatesTableProvider() { return [ 'only one compatible' => [ 'core_fixture' => '1.1-core_compatibility', diff --git a/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php b/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php index 4b35c749904..70530d56fef 100644 --- a/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php +++ b/core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php @@ -74,7 +74,7 @@ class UpdateSemverCoreSecurityCoverageTest extends UpdateSemverCoreTestBase { * - 10.4.0 * - 10.5.0 */ - public function securityCoverageMessageProvider() { + public static function securityCoverageMessageProvider() { $release_coverage_message = 'Visit the release cycle overview for more information on supported releases.'; $coverage_ended_message = 'Coverage has ended'; $update_asap_message = 'Update to a supported minor as soon as possible to continue receiving security updates.'; diff --git a/core/modules/update/tests/src/Kernel/UpdateReportTest.php b/core/modules/update/tests/src/Kernel/UpdateReportTest.php index 2a8ec0361ff..3a648282918 100644 --- a/core/modules/update/tests/src/Kernel/UpdateReportTest.php +++ b/core/modules/update/tests/src/Kernel/UpdateReportTest.php @@ -45,7 +45,7 @@ class UpdateReportTest extends KernelTestBase { * @return array * Array of $variables for template_preprocess_update_report(). */ - public function providerTemplatePreprocessUpdateReport() { + public static function providerTemplatePreprocessUpdateReport() { return [ '$variables with data not set' => [ [], diff --git a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php index a62714e70d0..41a6da04403 100644 --- a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php +++ b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php @@ -35,7 +35,7 @@ class UpdateLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of report routes to test. */ - public function getUpdateReportRoutes() { + public static function getUpdateReportRoutes() { return [ ['update.status'], ['update.settings'], @@ -57,7 +57,7 @@ class UpdateLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of module routes to test. */ - public function getUpdateModuleRoutes() { + public static function getUpdateModuleRoutes() { return [ ['update.module_update'], ]; @@ -77,7 +77,7 @@ class UpdateLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of theme routes to test. */ - public function getUpdateThemeRoutes() { + public static function getUpdateThemeRoutes() { return [ ['update.theme_update'], ]; diff --git a/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php b/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php index 1b68ef27d41..661d2742e23 100644 --- a/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php +++ b/core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php @@ -29,7 +29,7 @@ class ProjectCoreCompatibilityTest extends UnitTestCase { /** * Data provider for testSetProjectCoreCompatibilityRanges(). */ - public function providerSetProjectCoreCompatibilityRanges() { + public static function providerSetProjectCoreCompatibilityRanges() { $test_cases['no 9 releases'] = [ 'project_data' => [ 'recommended' => '1.0.1', diff --git a/core/modules/update/tests/src/Unit/ProjectReleaseTest.php b/core/modules/update/tests/src/Unit/ProjectReleaseTest.php index ebd538338b7..cfc595a6fc5 100644 --- a/core/modules/update/tests/src/Unit/ProjectReleaseTest.php +++ b/core/modules/update/tests/src/Unit/ProjectReleaseTest.php @@ -63,7 +63,7 @@ class ProjectReleaseTest extends UnitTestCase { * @return mixed * Test cases for testCreateFromArray(). */ - public function providerCreateFromArray(): array { + public static function providerCreateFromArray(): array { return [ 'default valid' => [ 'data' => [], @@ -151,7 +151,7 @@ class ProjectReleaseTest extends UnitTestCase { /** * Data provider for testCreateFromArrayMissingField(). */ - public function providerCreateFromArrayMissingField(): array { + public static function providerCreateFromArrayMissingField(): array { return [ 'status' => ['status'], 'version' => ['version'], @@ -188,7 +188,7 @@ class ProjectReleaseTest extends UnitTestCase { /** * Data provider for testCreateFromArrayInvalidField(). */ - public function providerCreateFromArrayInvalidField(): array { + public static function providerCreateFromArrayInvalidField(): array { return [ 'status other' => [ 'invalid_field' => 'status', diff --git a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php index 26544d929c7..725da72fa05 100644 --- a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php +++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php @@ -117,7 +117,7 @@ class UpdateFetcherTest extends UnitTestCase { * - 'site_key' - An arbitrary site key. * - 'expected' - The expected URL from UpdateFetcher::buildFetchUrl(). */ - public function providerTestUpdateBuildFetchUrl() { + public static function providerTestUpdateBuildFetchUrl() { $data = []; // First test that we didn't break the trivial case. diff --git a/core/modules/update/tests/src/Unit/UpdateMailTest.php b/core/modules/update/tests/src/Unit/UpdateMailTest.php index cba4fbb1ffa..b79df48c950 100644 --- a/core/modules/update/tests/src/Unit/UpdateMailTest.php +++ b/core/modules/update/tests/src/Unit/UpdateMailTest.php @@ -181,7 +181,7 @@ class UpdateMailTest extends UnitTestCase { * - TRUE if the user is authorized. * - An array of message body strings. */ - public function providerTestUpdateEmail(): array { + public static function providerTestUpdateEmail(): array { return [ 'all' => [ 'all', diff --git a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php index 442a0cb8c6d..edc7308dfe9 100644 --- a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php +++ b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php @@ -279,7 +279,7 @@ class UserPasswordResetTest extends BrowserTestBase { * * @return array */ - public function languagePrefixTestProvider() { + public static function languagePrefixTestProvider() { return [ 'Test language prefix set as \'\', visiting default with preferred language as en' => [ 'setPreferredLangcode' => 'en', diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php index b71277ba822..87df992528d 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php @@ -100,7 +100,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { /** * Data provider for user role migration tests. */ - public function providerTestUserRole() { + public static function providerTestUserRole() { return [ 'filter only' => [ 'modules' => [], diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php index 9dc0c72ea30..977b2ebcacf 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php @@ -20,7 +20,7 @@ class ProfileFieldTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php index a87ede1f7ad..1c175c1763c 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php @@ -20,7 +20,7 @@ class UserPictureInstanceTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php index ea73ea88966..da3780faed0 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldOptionTranslationTest.php @@ -22,7 +22,7 @@ class ProfileFieldOptionTranslationTest extends ProfileFieldTest { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $test = parent::providerSource(); // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php index 872a186efbb..58e0716bbb1 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldValuesTest.php @@ -20,7 +20,7 @@ class ProfileFieldValuesTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php index d37659b4f8b..0fd5c51fa49 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/RoleTest.php @@ -20,7 +20,7 @@ class RoleTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = [ [ 'source_data' => [], diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php index 4875f84885c..47902d5bbfe 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php @@ -20,7 +20,7 @@ class UserPictureFileTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php index 2eb61d84c1e..9ba7539f849 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php @@ -20,7 +20,7 @@ class UserPictureTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php index 19f85be63a8..e15303ffff4 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserTest.php @@ -20,7 +20,7 @@ class UserTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php index 885894c7809..947ffcac471 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/RoleTest.php @@ -20,7 +20,7 @@ class RoleTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $expected = [ [ 'rid' => 1, diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php index d8d5d722428..00d1c5d4c67 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserEntityTranslationTest.php @@ -21,7 +21,7 @@ class UserEntityTranslationTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php index 5f8a90a6552..968a9e17637 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/d7/UserTest.php @@ -20,7 +20,7 @@ class UserTest extends MigrateSqlSourceTestBase { /** * {@inheritdoc} */ - public function providerSource() { + public static function providerSource() { $tests = []; // The source data. diff --git a/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php b/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php index 37e788e19e3..e3426ea5dc7 100644 --- a/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php +++ b/core/modules/user/tests/src/Kernel/UserMailDefaultsTest.php @@ -40,7 +40,7 @@ class UserMailDefaultsTest extends KernelTestBase { * @return array * Array of arrays containing the set of user mail configuration keys. */ - public function userMailsProvider() { + public static function userMailsProvider() { return [ ['cancel_confirm'], ['password_reset'], diff --git a/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php b/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php index 28bec8b5b12..a5b16cd1bb1 100644 --- a/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php +++ b/core/modules/user/tests/src/Kernel/UserMailNotifyTest.php @@ -33,7 +33,7 @@ class UserMailNotifyTest extends EntityKernelTestBase { * * @return array */ - public function userMailsProvider() { + public static function userMailsProvider() { return [ 'cancel confirm notification' => [ 'cancel_confirm', diff --git a/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php b/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php index d0120508d90..d8eb84c6aea 100644 --- a/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php +++ b/core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php @@ -100,7 +100,7 @@ class EntityPermissionsFormTest extends UnitTestCase { * * @return array */ - public function providerTestPermissionsByProvider() { + public static function providerTestPermissionsByProvider() { return [ 'direct dependency' => ['node.type.article', TRUE], 'indirect dependency' => ['core.entity_view_display.node.article.full', TRUE], diff --git a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php index 5a791d66cd5..f812efce920 100644 --- a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php +++ b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php @@ -42,7 +42,7 @@ class UserLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getUserAdminRoutes() { + public static function getUserAdminRoutes() { return [ ['entity.user.collection', [['entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection', 'user.role.settings']]], ['user.admin_permissions', [['entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection', 'user.role.settings']]], @@ -66,7 +66,7 @@ class UserLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getUserLoginRoutes() { + public static function getUserLoginRoutes() { return [ ['user.login'], ['user.register'], @@ -92,7 +92,7 @@ class UserLocalTasksTest extends LocalTaskIntegrationTestBase { /** * Provides a list of routes to test. */ - public function getUserPageRoutes() { + public static function getUserPageRoutes() { return [ ['entity.user.canonical'], ['entity.user.edit_form'], diff --git a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php index 4ed2bedac1e..3c98ff42bd6 100644 --- a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php +++ b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php @@ -53,7 +53,7 @@ class PermissionAccessCheckTest extends UnitTestCase { * * @return array */ - public function providerTestAccess() { + public static function providerTestAccess() { return [ [[], FALSE], [['_permission' => 'allowed'], TRUE, ['user.permissions']], diff --git a/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php b/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php index 0ad90dbc4a0..2740acf784e 100644 --- a/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php +++ b/core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php @@ -35,7 +35,7 @@ class AdminNegotiatorTest extends UnitTestCase { /** * Provides a list of theme names to test. */ - public function getThemes() { + public static function getThemes() { return [ ['claro', 'claro'], [NULL, NULL], diff --git a/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php b/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php index 8abe7759a11..624da1b2348 100644 --- a/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php +++ b/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php @@ -167,7 +167,7 @@ class UserAccessControlHandlerTest extends UnitTestCase { /** * Provides test data for testUserNameAccess(). */ - public function userNameProvider() { + public static function userNameProvider() { $name_access = [ // The viewer user is allowed to see user names on all accounts. [ @@ -218,7 +218,7 @@ class UserAccessControlHandlerTest extends UnitTestCase { /** * Provides test data for testHiddenUserSettings(). */ - public function hiddenUserSettingsProvider() { + public static function hiddenUserSettingsProvider() { $access_info = []; $fields = [ @@ -285,7 +285,7 @@ class UserAccessControlHandlerTest extends UnitTestCase { /** * Provides test data for testAdminFieldAccess(). */ - public function adminFieldAccessProvider() { + public static function adminFieldAccessProvider() { $access_info = []; $fields = [ @@ -335,7 +335,7 @@ class UserAccessControlHandlerTest extends UnitTestCase { /** * Provides test data for passwordAccessProvider(). */ - public function passwordAccessProvider() { + public static function passwordAccessProvider() { $pass_access = [ [ 'viewer' => 'viewer', @@ -380,7 +380,7 @@ class UserAccessControlHandlerTest extends UnitTestCase { /** * Provides test data for testCreatedAccess(). */ - public function createdAccessProvider() { + public static function createdAccessProvider() { $created_access = [ [ 'viewer' => 'viewer', @@ -419,7 +419,7 @@ class UserAccessControlHandlerTest extends UnitTestCase { /** * Provides test data for testNonExistingFieldAccess(). */ - public function NonExistingFieldAccessProvider() { + public static function NonExistingFieldAccessProvider() { $created_access = [ [ 'viewer' => 'viewer', diff --git a/core/modules/user/tests/src/Unit/UserAuthTest.php b/core/modules/user/tests/src/Unit/UserAuthTest.php index e14e40225a3..364376aa125 100644 --- a/core/modules/user/tests/src/Unit/UserAuthTest.php +++ b/core/modules/user/tests/src/Unit/UserAuthTest.php @@ -108,7 +108,7 @@ class UserAuthTest extends UnitTestCase { * * @return array */ - public function providerTestAuthenticateWithMissingCredentials() { + public static function providerTestAuthenticateWithMissingCredentials() { return [ [NULL, NULL], [NULL, ''], diff --git a/core/modules/user/tests/src/Unit/UserNameItemTest.php b/core/modules/user/tests/src/Unit/UserNameItemTest.php index 0a0a3ce594b..50c09eee683 100644 --- a/core/modules/user/tests/src/Unit/UserNameItemTest.php +++ b/core/modules/user/tests/src/Unit/UserNameItemTest.php @@ -42,7 +42,7 @@ class UserNameItemTest extends UnitTestCase { * @return array * Test cases. */ - public function providerMaxLength(): array { + public static function providerMaxLength(): array { return [ '32' => [32], '255' => [255], diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index dc5f4fa9ee5..6c9d518dabf 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -322,7 +322,7 @@ class ExposedFormTest extends ViewTestBase { * @return array * Array of display names to test. */ - public function providerTestExposedBlock() { + public static function providerTestExposedBlock() { return [ 'page_display' => ['page_1'], 'block_display' => ['block_1'], diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php index 747c8d525c5..766d01632cb 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php @@ -47,7 +47,7 @@ class FieldNumericTest extends ViewsKernelTestBase { * The data set containing field settings, values to set and expected * values. */ - public function providerTestFieldNumeric() { + public static function providerTestFieldNumeric() { return [ 'no-formatting' => [ [], diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php index ab7cef8c839..40e5b908a09 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php @@ -130,7 +130,7 @@ class FilterNumericTest extends ViewsKernelTestBase { * An array of arrays, each containing the parameters for * self::testFilterNumericBetween(). */ - public function providerTestFilterNumericBetween() { + public static function providerTestFilterNumericBetween() { $all_result = [ ['name' => 'John', 'age' => 25], ['name' => 'George', 'age' => 27], diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php index 52bd97c0308..05a73abfa71 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/StyleGridResponsiveTest.php @@ -68,7 +68,7 @@ class StyleGridResponsiveTest extends PluginKernelTestBase { * @return array * Array containing options for the style plugin and expected values. */ - public function providerTestResponsiveGrid() { + public static function providerTestResponsiveGrid() { return [ 'horizontal' => [ 'settings' => [ diff --git a/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php b/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php index 2379c9567f6..c7df3c222b3 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php @@ -143,7 +143,7 @@ class EntityTest extends UnitTestCase { * * @return array */ - public function providerTestTokens() { + public static function providerTestTokens() { return [ ['{{ raw_arguments.test1 }}', 5], ['{{ arguments.test2 }}', 6], diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php index c8e65c97b1b..c59a2e5a8af 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php @@ -92,7 +92,7 @@ class ResultTest extends UnitTestCase { * * @return array */ - public function providerTestResultArea() { + public static function providerTestResultArea() { return [ ['@label', 'ResultTest'], ['@start', '1'], diff --git a/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php b/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php index 28f1adc6d2c..796b4c7b03f 100644 --- a/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/argument_default/QueryParameterTest.php @@ -44,7 +44,7 @@ class QueryParameterTest extends UnitTestCase { * - second entry: the request object to test with. * - third entry: the expected default argument value. */ - public function providerGetArgument() { + public static function providerGetArgument() { $data = []; $data[] = [ diff --git a/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php b/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php index 9e9c39f9376..8efeafb3c07 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/CounterTest.php @@ -100,7 +100,7 @@ class CounterTest extends UnitTestCase { * @return array * Returns an array of row index to test. */ - public function providerRowIndexes() { + public static function providerRowIndexes() { return [ [0], [1], diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php index a7899a91431..a5b7b8b5b41 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php @@ -271,7 +271,7 @@ class FieldPluginBaseTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestRenderTrimmedWithMoreLinkAndPath() { + public static function providerTestRenderTrimmedWithMoreLinkAndPath() { $data = []; // Simple path with default options. $data[] = ['test-path', '/test-path']; @@ -562,7 +562,7 @@ class FieldPluginBaseTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestRenderAsLinkWithPathAndTokens() { + public static function providerTestRenderAsLinkWithPathAndTokens() { $tokens = ['{{ foo }}' => 123]; $link_html = '<a href="/test-path/123">value</a>'; @@ -626,7 +626,7 @@ class FieldPluginBaseTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestRenderAsExternalLinkWithPathAndTokens() { + public static function providerTestRenderAsExternalLinkWithPathAndTokens() { $data = []; $data[] = ['{{ foo }}', ['{{ foo }}' => 'http://www.example.com'], '<a href="http://www.example.com">value</a>', ['context_path' => 'http://www.example.com']]; @@ -745,7 +745,7 @@ class FieldPluginBaseTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestGetRenderTokensWithQuery(): array { + public static function providerTestGetRenderTokensWithQuery(): array { $data = []; // No query parameters. $data[] = [ diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php index 999d55fb91d..a6eeea7bdfd 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php @@ -639,7 +639,7 @@ class FieldTest extends UnitTestCase { /** * Provides test data for testPrepareItemsByDelta(). */ - public function providerTestPrepareItemsByDelta() { + public static function providerTestPrepareItemsByDelta() { $data = []; // Let's display all values. @@ -706,7 +706,7 @@ class FieldTest extends UnitTestCase { * * @return array */ - public function providerSortOrders() { + public static function providerSortOrders() { return [ ['asc'], ['desc'], diff --git a/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php index 45b1778deaa..6ef76466f48 100644 --- a/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/filter/FilterPluginBaseTest.php @@ -34,7 +34,7 @@ class FilterPluginBaseTest extends UnitTestCase { * @return array * The data set. */ - public function acceptExposedInputProvider() { + public static function acceptExposedInputProvider() { return [ 'not-exposed' => [TRUE, ['exposed' => FALSE], []], 'exposed-no-input' => [TRUE, ['exposed' => TRUE], []], diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php index 053382c8838..e8906f874fb 100644 --- a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php @@ -185,7 +185,7 @@ class PagerPluginBaseTest extends UnitTestCase { * * @see self::testHasMoreRecords */ - public function providerTestHasMoreRecords() { + public static function providerTestHasMoreRecords() { return [ // No items per page, so there can't be more available records. [0, 0, 0, FALSE], diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php index 03f381174b7..c797edbd208 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php @@ -63,7 +63,7 @@ class MysqlDateSqlTest extends UnitTestCase { /** * Provider for date formatting test. */ - public function providerTestGetDateFormat() { + public static function providerTestGetDateFormat() { return [ ['foo.field', 'Y-y-M-m', '%Y-%y-%b-%m'], ['bar.field', 'n-F D d l', '%c-%M %a %d %W'], diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php index e9379825d51..835882c3692 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php @@ -63,7 +63,7 @@ class PostgresqlDateSqlTest extends UnitTestCase { /** * Provider for date formatting test. */ - public function providerTestGetDateFormat() { + public static function providerTestGetDateFormat() { return [ ['foo.field', 'Y-y-M-m', 'YYYY-YY-Mon-MM'], ['bar.field', 'n-F D d l', 'MM-Month Dy DD Day'], diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php index b7bc31f0557..82fe4d5e0a4 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php @@ -65,7 +65,7 @@ class SqliteDateSqlTest extends UnitTestCase { /** * Provider for date formatting test. */ - public function providerTestGetDateFormat() { + public static function providerTestGetDateFormat() { return [ ['foo.field', 'Y-y-M-m', "strftime('%Y-%Y-%m-%m', foo.field, 'unixepoch')"], ['bar.field', 'n-F D d l', "strftime('%m-%m %d %d %d', bar.field, 'unixepoch')"], diff --git a/core/modules/views/tests/src/Unit/PluginBaseTest.php b/core/modules/views/tests/src/Unit/PluginBaseTest.php index e185aa7ca92..a7e4a22017a 100644 --- a/core/modules/views/tests/src/Unit/PluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/PluginBaseTest.php @@ -74,7 +74,7 @@ class PluginBaseTest extends UnitTestCase { * * @return array */ - public function providerTestUnpackOptions() { + public static function providerTestUnpackOptions() { $test_parameters = []; // Set a storage but no value, so the storage value should be kept. $test_parameters[] = [ @@ -223,7 +223,7 @@ class PluginBaseTest extends UnitTestCase { * * @return array */ - public function providerTestSetOptionDefault() { + public static function providerTestSetOptionDefault() { $test_parameters = []; // No definition should change anything on the storage. $test_parameters[] = [ @@ -289,7 +289,7 @@ class PluginBaseTest extends UnitTestCase { $this->assertEquals($expected_storage, $storage); } - public function providerTestFilterByDefinedOptions() { + public static function providerTestFilterByDefinedOptions() { $data = []; // A simple defined option. diff --git a/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php index f8eaaafedb7..8586455d7f7 100644 --- a/core/modules/views/tests/src/Unit/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php @@ -444,7 +444,7 @@ class ViewExecutableTest extends UnitTestCase { * @return array[] * Test data set. */ - public function addHandlerProvider() { + public static function addHandlerProvider() { return [ 'field' => ['fields', 'field'], 'filter' => ['filters', 'filter'], @@ -519,7 +519,7 @@ class ViewExecutableTest extends UnitTestCase { * An array of arrays containing the display state, a user's access to the * display and whether it is expected or not that the display gets attached. */ - public function providerAttachDisplays() { + public static function providerAttachDisplays() { return [ 'enabled-granted' => [static::DISPLAY_ENABLED, static::ACCESS_GRANTED, TRUE], 'enabled-revoked' => [static::DISPLAY_ENABLED, static::ACCESS_REVOKED, FALSE], @@ -742,7 +742,7 @@ class ViewExecutableTest extends UnitTestCase { * @return array[] * An array of arrays containing the display state and expected value. */ - public function providerExecuteReturn() { + public static function providerExecuteReturn() { return [ 'enabled' => [static::DISPLAY_ENABLED, TRUE], 'disabled' => [static::DISPLAY_DISABLED, FALSE], diff --git a/core/modules/views/tests/src/Unit/ViewsDataTest.php b/core/modules/views/tests/src/Unit/ViewsDataTest.php index 49fbbbcc71a..f3e4e92a398 100644 --- a/core/modules/views/tests/src/Unit/ViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/ViewsDataTest.php @@ -648,7 +648,7 @@ class ViewsDataTest extends UnitTestCase { $this->viewsData->get($key); } - public function providerTestGetEmptyKey() { + public static function providerTestGetEmptyKey() { return [ [NULL], [''], diff --git a/core/modules/views/tests/src/Unit/ViewsTest.php b/core/modules/views/tests/src/Unit/ViewsTest.php index 5c750c9b0a9..82e9b0580ea 100644 --- a/core/modules/views/tests/src/Unit/ViewsTest.php +++ b/core/modules/views/tests/src/Unit/ViewsTest.php @@ -209,7 +209,7 @@ class ViewsTest extends UnitTestCase { * * @return array */ - public function providerTestGetApplicableViews() { + public static function providerTestGetApplicableViews() { return [ ['type_a', [['test_view_1', 'type_a']]], ['type_b', [['test_view_2', 'type_b']]], diff --git a/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php b/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php index 97f5dfd0f21..3c2e84baf03 100644 --- a/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/WizardPluginBaseTest.php @@ -38,7 +38,7 @@ class WizardPluginBaseTest extends UnitTestCase { /** * Provides test data for testGetSelected(). */ - public function providerTestGetSelected() { + public static function providerTestGetSelected() { $data = []; // A form element with an invalid #type. $data['invalid_type'] = [ diff --git a/core/modules/views_ui/tests/src/Kernel/TagTest.php b/core/modules/views_ui/tests/src/Kernel/TagTest.php index 3707d21c478..ef10e203e79 100644 --- a/core/modules/views_ui/tests/src/Kernel/TagTest.php +++ b/core/modules/views_ui/tests/src/Kernel/TagTest.php @@ -100,7 +100,7 @@ class TagTest extends ViewsKernelTestBase { * @return array[] * The data set. */ - public function providerViewsUiAutocompleteIndividualTags() { + public static function providerViewsUiAutocompleteIndividualTags() { return [ 'tag' => ['comma', 'comma'], 'case insensitive tag' => ['comma', 'COMMA'], diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php index df849618212..6a2f9e3987d 100644 --- a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php +++ b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php @@ -119,7 +119,7 @@ class WorkflowAccessControlHandlerTest extends KernelTestBase { * * @return array */ - public function checkAccessProvider() { + public static function checkAccessProvider() { $container = new ContainerBuilder(); $cache_contexts_manager = (new Prophet())->prophesize(CacheContextsManager::class); $cache_contexts_manager->assertValidTokens()->willReturn(TRUE); diff --git a/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php b/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php index ad01d100e8a..1f7b4ed4517 100644 --- a/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php +++ b/core/modules/workflows/tests/src/Unit/WorkflowStateTransitionOperationsAccessCheckTest.php @@ -50,7 +50,7 @@ class WorkflowStateTransitionOperationsAccessCheckTest extends UnitTestCase { /** * Test cases for ::testAccess. */ - public function accessTestCases() { + public static function accessTestCases() { return [ 'Transition add' => [ 'add-transition', @@ -140,7 +140,7 @@ class WorkflowStateTransitionOperationsAccessCheckTest extends UnitTestCase { /** * Test cases for ::testInvalidOperationName. */ - public function invalidOperationNameTestCases() { + public static function invalidOperationNameTestCases() { return [ ['invalid-op'], ['foo-add-transition'], diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php index 87d111cd5bc..b3e86398b58 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php @@ -49,7 +49,7 @@ class WorkspaceAccessTest extends KernelTestBase { * @return array * An array of operations and permissions to test with. */ - public function operationCases() { + public static function operationCases() { return [ ['create', 'administer workspaces'], ['create', 'create workspace'], diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php index 78702d398c7..01884992fb7 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php @@ -752,7 +752,7 @@ class WorkspaceIntegrationTest extends KernelTestBase { /** * Data provider for allowed entity CRUD operations. */ - public function providerTestAllowedEntityCrudInNonDefaultWorkspace() { + public static function providerTestAllowedEntityCrudInNonDefaultWorkspace() { return [ 'workspace-provided non-internal entity type' => [ 'entity_type_id' => 'workspace', diff --git a/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php b/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php index b5093824ca9..1105dcfd577 100644 --- a/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php +++ b/core/modules/workspaces/tests/src/Unit/ActiveWorkspaceCheckTest.php @@ -46,7 +46,7 @@ class ActiveWorkspaceCheckTest extends UnitTestCase { * * @return array */ - public function providerTestAccess() { + public static function providerTestAccess() { return [ [[], FALSE, FALSE], [[], TRUE, FALSE], diff --git a/core/tests/Drupal/BuildTests/Composer/Component/ComponentsTaggedReleaseTest.php b/core/tests/Drupal/BuildTests/Composer/Component/ComponentsTaggedReleaseTest.php index ae3a08ec362..5640ff4dde2 100644 --- a/core/tests/Drupal/BuildTests/Composer/Component/ComponentsTaggedReleaseTest.php +++ b/core/tests/Drupal/BuildTests/Composer/Component/ComponentsTaggedReleaseTest.php @@ -26,7 +26,7 @@ class ComponentsTaggedReleaseTest extends ComposerBuildTestBase { * - Second element is the resulting constraint which should be present in * the component core dependencies. */ - public function providerVersionConstraint(): array { + public static function providerVersionConstraint(): array { return [ // [Tag, constraint] '1.0.x-dev' => ['1.0.x-dev', '1.0.x-dev'], diff --git a/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php index a3420045751..cfbd463ddb3 100644 --- a/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php +++ b/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php @@ -67,7 +67,7 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase { return $data; } - public function provideTemplateCreateProject() { + public static function provideTemplateCreateProject() { return [ 'recommended-project' => [ 'drupal/recommended-project', diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php index c6996f06d31..c2a1d3e5a88 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php @@ -117,7 +117,7 @@ class FormValuesTest extends WebDriverTestBase { /** * Data provider for testSimpleAjaxFormValue. */ - public function formModeProvider() { + public static function formModeProvider() { return [ ['direct'], ['dialog'], diff --git a/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php b/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php index d223feab7b5..74546cb8104 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/MachineName/MachineNameTransliterationTest.php @@ -70,7 +70,7 @@ class MachineNameTransliterationTest extends WebDriverTestBase { * * @return array */ - public function machineNameInputOutput(): array { + public static function machineNameInputOutput(): array { return [ // cSpell:disable ['en', 'Bob', 'bob'], diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php index ff8a8ab18b9..7899ebe05e9 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php @@ -85,7 +85,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { /** * Data provider for testPageTitle. */ - public function providerPageTitle(): array { + public static function providerPageTitle(): array { return [ ['entity_test_rev', 'Are you sure you want to delete the revision?'], ['entity_test_revlog', 'Are you sure you want to delete the revision from Sun, 01/11/2009 - 16:00?'], @@ -276,7 +276,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { /** * Data provider for testSubmitForm. */ - public function providerSubmitForm(): array { + public static function providerSubmitForm(): array { $data = []; $data['not supporting revision log, one revision remaining after delete, no view access'] = [ diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php index 1597137797b..6c774ae37ab 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php @@ -86,7 +86,7 @@ class RevisionRevertFormTest extends BrowserTestBase { /** * Data provider for testPageTitle. */ - public function providerPageTitle(): array { + public static function providerPageTitle(): array { return [ ['entity_test_rev', 'Are you sure you want to revert the revision?'], ['entity_test_revlog', 'Are you sure you want to revert to the revision from Sun, 01/11/2009 - 16:00?'], @@ -227,7 +227,7 @@ class RevisionRevertFormTest extends BrowserTestBase { /** * Data provider for testSubmitForm. */ - public function providerSubmitForm(): array { + public static function providerSubmitForm(): array { $data = []; $data['not supporting revision log, no version history access'] = [ diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php index f728b6c9580..f2054caf7f1 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php @@ -106,7 +106,7 @@ class RevisionViewTest extends BrowserTestBase { /** * Data provider for testRevisionPage. */ - public function providerRevisionPage(): array { + public static function providerRevisionPage(): array { return [ ['entity_test_rev', 'Revision of revision 1, view revision'], ['entity_test_revlog', 'Revision of revision 1, view revision from Sun, 01/11/2009 - 16:00'], diff --git a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php index e9bcedaa2f3..1c144d9173f 100644 --- a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php +++ b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php @@ -344,7 +344,7 @@ class JqueryUiLibraryAssetsTest extends BrowserTestBase { * library prior to the change from jQuery UI library dependencies to * direct file inclusion. */ - public function providerTestAssetLoading() { + public static function providerTestAssetLoading() { return [ 'drupal.autocomplete' => [ 'library' => 'drupal.autocomplete', diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php index 242f9e42467..e620d5c1f3d 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php @@ -190,7 +190,7 @@ class RouteCachingLanguageTest extends BrowserTestBase { /** * Data provider for testFromUri(). */ - public function providerLanguage() { + public static function providerLanguage() { return [ ['en'], ['fr'], diff --git a/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php b/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php index ae2b16367ab..5a33a900b86 100644 --- a/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php +++ b/core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php @@ -50,7 +50,7 @@ class FormattableMarkupKernelTest extends KernelTestBase { /** * @return array */ - public function providerTestFormattableMarkupUri() { + public static function providerTestFormattableMarkupUri() { $data = []; $data['routed-url'] = [ 'Hey giraffe <a href=":url">MUUUH</a>', @@ -112,7 +112,7 @@ class FormattableMarkupKernelTest extends KernelTestBase { /** * @return array */ - public function providerTestFormattableMarkupUriWithException() { + public static function providerTestFormattableMarkupUriWithException() { $data = []; $data['js-protocol'] = [ 'Hey giraffe <a href=":url">MUUUH</a>', diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php index 396623bec75..07dcf47f9db 100644 --- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php +++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php @@ -143,7 +143,7 @@ class DefaultConfigTest extends KernelTestBase { * An array of theme names to test, with both key and value being the name * of the theme. */ - public function themeListDataProvider() { + public static function themeListDataProvider() { $prefix = dirname(__DIR__, 4) . DIRECTORY_SEPARATOR . 'themes'; $theme_dirs = array_keys(iterator_to_array(new \FilesystemIterator($prefix))); $theme_names = array_map(function ($path) use ($prefix) { diff --git a/core/tests/Drupal/KernelTests/Config/Schema/MappingTest.php b/core/tests/Drupal/KernelTests/Config/Schema/MappingTest.php index 0ca7c28c38a..61d8c31295d 100644 --- a/core/tests/Drupal/KernelTests/Config/Schema/MappingTest.php +++ b/core/tests/Drupal/KernelTests/Config/Schema/MappingTest.php @@ -175,7 +175,7 @@ class MappingTest extends KernelTestBase { * * @return \Generator */ - public function providerMappingInterpretation(): \Generator { + public static function providerMappingInterpretation(): \Generator { $available_block_settings_types = [ 'block.settings.field_block:*:*:*' => [ 'formatter', diff --git a/core/tests/Drupal/KernelTests/Core/Asset/DeprecatedAssetsTest.php b/core/tests/Drupal/KernelTests/Core/Asset/DeprecatedAssetsTest.php index 6f41b1c9bd5..bd7f3ac0eea 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/DeprecatedAssetsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/DeprecatedAssetsTest.php @@ -57,7 +57,7 @@ class DeprecatedAssetsTest extends KernelTestBase { * @return array * See description above. */ - public function deprecatedLibrariesProvider(): array { + public static function deprecatedLibrariesProvider(): array { return [ 'Tests deprecation of library core/js-cookie' => [ 'core', diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php index a2ad515b7c5..352f9b9f746 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php @@ -227,7 +227,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { /** * Data provider for self::testConfigEntityUninstallComplex(). */ - public function providerConfigEntityUninstallComplex() { + public static function providerConfigEntityUninstallComplex() { // Ensure that alphabetical order has no influence on dependency fixing and // removal. return [ diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php index 8b48cdd6ee2..30ed78fd7e1 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php @@ -201,7 +201,7 @@ abstract class ConfigEntityValidationTestBase extends KernelTestBase { * @return array[] * The test cases. */ - public function providerConfigDependenciesValidation(): array { + public static function providerConfigDependenciesValidation(): array { return [ 'valid dependency types' => [ [ diff --git a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php index de38eaaa6ea..aa5149e494b 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php @@ -72,7 +72,7 @@ class SchemaCheckTraitTest extends KernelTestBase { $this->assertEquals($no_data_expectations, $ret); } - public function providerCheckConfigSchema(): array { + public static function providerCheckConfigSchema(): array { // Storage type check errors. // @see \Drupal\Core\Config\Schema\SchemaCheckTrait::checkValue() $expected_storage_null_check_errors = [ diff --git a/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php index 5da73d74339..f714ab65f70 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php @@ -78,7 +78,7 @@ class SimpleConfigValidationTest extends KernelTestBase { * @return array[] * The test cases. */ - public function providerSpecialCharacters(): array { + public static function providerSpecialCharacters(): array { $data = []; for ($code_point = 0; $code_point < 32; $code_point++) { diff --git a/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php b/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php index 98bd908f097..a4e6cd2fd9d 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php @@ -80,7 +80,7 @@ class StorageReplaceDataWrapperTest extends ConfigStorageTestBase { * @return array * Returns an array of collection names. */ - public function providerCollections() { + public static function providerCollections() { return [ [StorageInterface::DEFAULT_COLLECTION], ['foo.bar'], diff --git a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php index 0a2c1650191..56e796e33db 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Database/DriverSpecificSchemaTestBase.php @@ -649,7 +649,7 @@ abstract class DriverSpecificSchemaTestBase extends DriverSpecificKernelTestBase * @return array * An array of test cases for SchemaTest::testSchemaCreateTablePrimaryKey(). */ - public function providerTestSchemaCreateTablePrimaryKey() { + public static function providerTestSchemaCreateTablePrimaryKey() { $tests = []; $tests['simple_primary_key'] = [ diff --git a/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php b/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php index f6db6e65d2f..438e442bd69 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/LoggingTest.php @@ -186,7 +186,7 @@ class LoggingTest extends DatabaseTestBase { * * @see ::testContribDriverLog() */ - public function providerContribDriverLog() { + public static function providerContribDriverLog() { $stack = [ [ 'file' => '/var/www/core/lib/Drupal/Core/Database/Log.php', diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php index c2a62186e09..6283b48d13e 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php @@ -25,7 +25,7 @@ class SelectExtenderTest extends KernelTestBase { * - The database driver namespace. * - The namespaced class name for which to extend. */ - public function providerExtend(): array { + public static function providerExtend(): array { return [ [ 'Drupal\Core\Database\Query\PagerSelectExtender', diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php index 7db76d03c56..8afe32e3863 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php @@ -19,7 +19,7 @@ class SelectLeastTest extends DatabaseTestBase { $this->assertEquals($expected, $least); } - public function selectLeastProvider() { + public static function selectLeastProvider() { return [ [[1, 2, 3, 4, 5, 6], 1], [['A', 'B', 'C', 'NULL', 'F'], 'A'], diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php index 68ea5ebb2f8..256da561a17 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectTest.php @@ -498,7 +498,7 @@ class SelectTest extends DatabaseTestBase { * - the regular expression pattern to search for. * - the regular expression operator 'REGEXP' or 'NOT REGEXP'. */ - public function providerRegularExpressionCondition() { + public static function providerRegularExpressionCondition() { return [ [['John'], 'name', 'hn$', 'REGEXP'], [['Paul'], 'name', '^Pau', 'REGEXP'], @@ -598,7 +598,7 @@ class SelectTest extends DatabaseTestBase { * Array of non array compatible operators and its value in the expected * exception message. */ - public function providerNonArrayOperatorWithArrayValueCondition() { + public static function providerNonArrayOperatorWithArrayValueCondition() { return [ '=' => ['=', '='], '>' => ['>', '>'], diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php index 958dc613240..231d1834f4c 100644 --- a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php @@ -175,7 +175,7 @@ class DatetimeElementFormTest extends KernelTestBase implements FormInterface, T * @return string[][] * Test cases. */ - public function providerUntrusted() : array { + public static function providerUntrusted() : array { return [ 'untrusted date' => [ 'datetimeDateCallback', diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php index ffa8cc7c7ca..ff1d2d5d551 100644 --- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php @@ -189,7 +189,7 @@ class DrupalKernelTest extends KernelTestBase { * Data provider for self::testClassLoaderAutoDetect. * @return array */ - public function providerClassLoaderAutoDetect() { + public static function providerClassLoaderAutoDetect() { return [ 'TRUE' => [TRUE], 'FALSE' => [FALSE], diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php index 88b4395841e..fd71efa81f2 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/ContentEntityStorageBaseTest.php @@ -41,7 +41,7 @@ class ContentEntityStorageBaseTest extends KernelTestBase { /** * Provides test data for testCreate(). */ - public function providerTestCreate() { + public static function providerTestCreate() { return [ ['scalar' => 'test_bundle'], ['array keyed by delta' => [0 => ['value' => 'test_bundle']]], diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php index 3a34d85990d..bf2ecb9519d 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php @@ -343,7 +343,7 @@ class EntityAccessControlHandlerTest extends EntityLanguageTestBase { $this->assertEquals('The entity ID cannot be changed.', $access_result->getReason()); } - public function providerTestFieldAccess() { + public static function providerTestFieldAccess() { return [ 'serial ID entity' => [ EntityTest::class, diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php index bcd9955e6ca..88f418d67fe 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php @@ -109,7 +109,7 @@ class EntityDecoupledTranslationRevisionsTest extends EntityKernelTestBase { /** * Data provider for ::testDecoupledDefaultRevisions. */ - public function dataTestDecoupledPendingRevisions() { + public static function dataTestDecoupledPendingRevisions() { $sets = []; $sets['Intermixed languages - No initial default translation'][] = [ @@ -211,7 +211,7 @@ class EntityDecoupledTranslationRevisionsTest extends EntityKernelTestBase { /** * Data provider for ::testUntranslatableFields. */ - public function dataTestUntranslatableFields() { + public static function dataTestUntranslatableFields() { $sets = []; $sets['Default behavior - Untranslatable fields affect all revisions'] = [ diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php index 48b33b75512..e71016b7045 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -669,7 +669,7 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase { /** * Test cases for ::testBaseFieldDeleteWithExistingData. */ - public function baseFieldDeleteWithExistingDataTestCases() { + public static function baseFieldDeleteWithExistingDataTestCases() { return [ 'Non-revisionable, non-translatable entity type' => [ 'entity_test_update', @@ -1296,7 +1296,7 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase { /** * Test cases for ::testInitialValueFromField. */ - public function initialValueFromFieldTestCases() { + public static function initialValueFromFieldTestCases() { return [ 'literal value' => [ 'test initial value', diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php index 9ae3f6bf32d..66ce30dd09b 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php @@ -68,7 +68,7 @@ class EntityDeriverTest extends KernelTestBase { /** * Provides test data for ::testDerivatives(). */ - public function derivativesProvider() { + public static function derivativesProvider() { return [ 'un-bundleable entity type with no bundle type' => ['entity:user', FALSE], 'un-bundleable entity type with bundle type' => ['entity:user:user', TRUE], diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php index 18eb76267d3..0b5d95eb6ca 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php @@ -42,7 +42,7 @@ class EntityKeysTest extends EntityKernelTestBase { /** * Data provider for ::testMultipleKeysCache. */ - public function multipleKeysCacheTestCases() { + public static function multipleKeysCacheTestCases() { return [ 'translatable Entity Key' => [ TRUE, diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php index 4528445ca16..b231f6d73fc 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php @@ -282,7 +282,7 @@ class EntitySchemaTest extends EntityKernelTestBase { * @return array * An array of test cases consisting of an entity type ID and a field name. */ - public function providerTestPrimaryKeyUpdate() { + public static function providerTestPrimaryKeyUpdate() { // Build up test cases for all possible entity type configurations. // For each entity type we test reinstalling each field that is part of // any table's primary key. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php index d4f0fe68549..0d40daef92f 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php @@ -171,7 +171,7 @@ class EntityTypedDataDefinitionTest extends KernelTestBase { /** * Provides test cases for testEntityDefinitionIsInternal. */ - public function entityDefinitionIsInternalProvider() { + public static function entityDefinitionIsInternalProvider() { return [ 'internal' => [TRUE, TRUE], 'external' => [FALSE, FALSE], diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php index 7e96479bb42..7b69cf8a7c1 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php @@ -185,7 +185,7 @@ class FieldableEntityDefinitionUpdateTest extends EntityKernelTestBase { /** * Data provider for testFieldableEntityTypeUpdates(). */ - public function providerTestFieldableEntityTypeUpdates() { + public static function providerTestFieldableEntityTypeUpdates() { return [ 'no change' => [ 'initial_rev' => FALSE, diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php index 59cd473b6c4..f0c24260b53 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php @@ -104,7 +104,7 @@ class RevisionRouteProviderTest extends KernelTestBase { * @return array * Data for testing. */ - public function providerOperationAccessRevisionRoutes(): array { + public static function providerOperationAccessRevisionRoutes(): array { $data = []; $data['view revision'] = [ diff --git a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php index 743178fa9d9..04ff69d5cc7 100644 --- a/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php @@ -102,7 +102,7 @@ class ModuleInstallerTest extends KernelTestBase { /** * Data provider for testInvalidCoreInstall(). */ - public function providerTestInvalidCoreInstall() { + public static function providerTestInvalidCoreInstall() { return [ 'no dependencies system_core_incompatible_semver_test' => [ 'system_core_incompatible_semver_test', diff --git a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php index 92c1b98cc04..5b959bb860f 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/Entity/BaseFieldOverrideTest.php @@ -52,7 +52,7 @@ class BaseFieldOverrideTest extends KernelTestBase { /** * Test cases for ::testGetClass. */ - public function getClassTestCases() { + public static function getClassTestCases() { return [ 'String (default class)' => [ 'string', diff --git a/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php b/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php index 5359ee3fc56..1ccb74990c6 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php @@ -219,7 +219,7 @@ class FileUrlGeneratorTest extends FileTestBase { /** * Data provider. */ - public function providerGenerateURI() { + public static function providerGenerateURI() { return [ 'schemaless' => [ diff --git a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php index c24bd75e3f5..c6eefa1f446 100644 --- a/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php @@ -43,7 +43,7 @@ class UrlTransformRelativeTest extends KernelTestBase { $this->assertSame($expected, \Drupal::service('file_url_generator')->transformRelative($url, $root_relative)); } - public function providerFileUrlTransformRelative() { + public static function providerFileUrlTransformRelative() { $data = [ 'http' => [ 'example.com', diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php index 267538134db..adfb4229476 100644 --- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php +++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php @@ -105,7 +105,7 @@ class ToolkitGdTest extends KernelTestBase { /** * Data provider for ::testManipulations(). */ - public function providerTestImageFiles(): array { + public static function providerTestImageFiles(): array { // Typically the corner colors will be unchanged. These colors are in the // order of top-left, top-right, bottom-right, bottom-left. $default_corners = [static::RED, static::GREEN, static::BLUE, static::TRANSPARENT]; @@ -390,7 +390,7 @@ class ToolkitGdTest extends KernelTestBase { /** * Data provider for ::testCreateImageFromScratch(). */ - public function providerSupportedImageTypes(): array { + public static function providerSupportedImageTypes(): array { return [ [IMAGETYPE_PNG], [IMAGETYPE_GIF], diff --git a/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php b/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php index 6b897941512..41b2e770e30 100644 --- a/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Installer/InstallerRedirectTraitTest.php @@ -29,7 +29,7 @@ class InstallerRedirectTraitTest extends KernelTestBase { * - Whether or not there is database connection info. * - Whether or not there exists a sessions table in the database. */ - public function providerShouldRedirectToInstaller() { + public static function providerShouldRedirectToInstaller() { return [ [TRUE, DatabaseNotFoundException::class, FALSE, FALSE], [TRUE, DatabaseNotFoundException::class, TRUE, FALSE], diff --git a/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php b/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php index 92ac3cec7a2..3977ac885f5 100644 --- a/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Layout/IconBuilderTest.php @@ -32,7 +32,7 @@ class IconBuilderTest extends KernelTestBase { $this->assertSame($expected, $output); } - public function providerTestBuild() { + public static function providerTestBuild() { $data = []; $data['empty'][] = (new SvgIconBuilder()); $data['empty'][] = []; diff --git a/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php b/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php index 11faa4aeb4a..6ec99deb050 100644 --- a/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php @@ -81,7 +81,7 @@ class PagerManagerTest extends KernelTestBase { * - Array of elements to pass to PagerManager::createPager(). * - The expected value returned by PagerManager::getMaxPagerElementId(). */ - public function providerTestGetMaxPagerElementId(): array { + public static function providerTestGetMaxPagerElementId(): array { return [ 'no_pager' => [[], -1], 'single_pager' => [[0], 0], diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php index 33c407508e7..faec6e8c45f 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Condition/ResponseStatusTest.php @@ -77,7 +77,7 @@ class ResponseStatusTest extends KernelTestBase { /** * Provides test data for testConditions. */ - public function providerTestConditions() { + public static function providerTestConditions() { // Default values with 200 response code. yield [ 'status_codes' => [], diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php index f75f65193bc..d4a3770a587 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/ContextTypedDataTest.php @@ -63,7 +63,7 @@ class ContextTypedDataTest extends KernelTestBase { /** * Data provider for testHasContextValue. */ - public function providerHasContextValue() { + public static function providerHasContextValue() { return [ [TRUE, FALSE], [TRUE, 0], diff --git a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php index 03c04c3c982..30ea7be869b 100644 --- a/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Routing/RouteProviderTest.php @@ -204,7 +204,7 @@ class RouteProviderTest extends KernelTestBase { /** * Data provider for testMixedCasePaths() */ - public function providerMixedCaseRoutePaths() { + public static function providerMixedCaseRoutePaths() { // cSpell:disable return [ ['/path/one', 'route_a'], @@ -254,7 +254,7 @@ class RouteProviderTest extends KernelTestBase { /** * Data provider for testMixedCasePaths() */ - public function providerDuplicateRoutePaths() { + public static function providerDuplicateRoutePaths() { // When matching routes with the same fit the route with the lowest-sorting // name should end up first in the resulting route collection. return [ diff --git a/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php b/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php index 2cc2ee5a402..d548cab0140 100644 --- a/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php +++ b/core/tests/Drupal/KernelTests/Core/StreamWrapper/StreamWrapperManagerTest.php @@ -43,7 +43,7 @@ class StreamWrapperManagerTest extends KernelTestBase { /** * Data provider. */ - public function providerTestUriScheme() { + public static function providerTestUriScheme() { $data = []; $data[] = [ 'public://filename', diff --git a/core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php b/core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php index 61cf2818080..81db9967a6e 100644 --- a/core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php @@ -54,7 +54,7 @@ class MarkupInterfaceComparatorTest extends KernelTestBase { * comparison should match, FALSE if error, or a class name of an object * thrown. */ - public function dataSetProvider() { + public static function dataSetProvider() { return [ 'FormattableMarkup vs FormattableMarkup, equal' => [ new FormattableMarkup('GoldFinger', []), @@ -162,7 +162,7 @@ class MarkupInterfaceComparatorTest extends KernelTestBase { * thrown. * - the expected deprecation message. */ - public function dataSetProviderDeprecatedCases() { + public static function dataSetProviderDeprecatedCases() { return [ 'html string with tags vs FormattableMarkup, equal' => [ '<em class="placeholder">For Your Eyes</em> Only', diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index 1a1328dd597..d5f74801f7c 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -218,7 +218,7 @@ class RegistryTest extends KernelTestBase { * @return array * An associative array of 40x theme suggestions. */ - public function provider40xThemeSuggestions() { + public static function provider40xThemeSuggestions() { return [ [401, 'page__401'], [403, 'page__403'], diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php index 0e2b1bd7ffc..2ba2622a6e8 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php @@ -192,7 +192,7 @@ class ThemeInstallerTest extends KernelTestBase { /** * Data provider for testInstallThemeWithUnmetModuleDependencies(). */ - public function providerTestInstallThemeWithUnmetModuleDependencies() { + public static function providerTestInstallThemeWithUnmetModuleDependencies() { return [ 'theme with uninstalled module dependencies' => [ 'test_theme_depending_on_modules', diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php index a6708856467..901be11a72f 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php @@ -55,7 +55,7 @@ class ThemeRenderAndAutoescapeTest extends KernelTestBase { /** * Provide test examples. */ - public function providerTestThemeRenderAndAutoescape() { + public static function providerTestThemeRenderAndAutoescape() { return [ 'empty string unchanged' => ['', ''], 'simple string unchanged' => ['ab', 'ab'], diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php index 7d3d4016079..2aa4a9bc904 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php @@ -38,7 +38,7 @@ class TwigMarkupInterfaceTest extends KernelTestBase { /** * Provide test examples. */ - public function providerTestMarkupInterfaceEmpty() { + public static function providerTestMarkupInterfaceEmpty() { return [ // The first argument to \Drupal\Core\StringTranslation\TranslatableMarkup // is not supposed to be an empty string. diff --git a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php index 14314de2d88..f52b8fb8dce 100644 --- a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php +++ b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php @@ -398,7 +398,7 @@ DOCBLOCK; } - public function getAnnotationVarTypeProviderValid() + public static function getAnnotationVarTypeProviderValid() { //({attribute name}, {attribute value}) return array( @@ -451,7 +451,7 @@ DOCBLOCK; ); } - public function getAnnotationVarTypeProviderInvalid() + public static function getAnnotationVarTypeProviderInvalid() { //({attribute name}, {type declared type}, {attribute value} , {given type or class}) return array( @@ -504,7 +504,7 @@ DOCBLOCK; ); } - public function getAnnotationVarTypeArrayProviderInvalid() + public static function getAnnotationVarTypeArrayProviderInvalid() { //({attribute name}, {type declared type}, {attribute value} , {given type or class}) return array( @@ -760,7 +760,7 @@ DOCBLOCK; $parser->parse($docblock); } - public function getConstantsProvider() + public static function getConstantsProvider() { $provider[] = array( '@AnnotationWithConstants(PHP_EOL)', diff --git a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php index 384bb30ed5d..eb5772781a3 100644 --- a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php +++ b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php @@ -35,7 +35,7 @@ class InspectorTest extends TestCase { $this->assertSame($expected, Inspector::assertAllStrings($input)); } - public function providerTestAssertAllStrings() { + public static function providerTestAssertAllStrings() { $data = [ 'empty-array' => [[], TRUE], 'array-with-strings' => [['foo', 'bar'], TRUE], diff --git a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php index 28c91f351c9..99d0b79bdb4 100644 --- a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +++ b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php @@ -317,7 +317,7 @@ class DateTimePlusTest extends TestCase { * * @see DateTimePlusTest::testDates() */ - public function providerTestDates() { + public static function providerTestDates() { $dates = [ // String input. // Create date object from datetime string. @@ -357,7 +357,7 @@ class DateTimePlusTest extends TestCase { * * @see DateTimePlusTest::testDates() */ - public function providerTestDateArrays() { + public static function providerTestDateArrays() { $dates = [ // Array input. // Create date object from date array, date only. @@ -397,7 +397,7 @@ class DateTimePlusTest extends TestCase { * * @see testDateFormats() */ - public function providerTestDateFormat() { + public static function providerTestDateFormat() { return [ // Create a year-only date. ['2009', NULL, 'Y', 'Y', '2009'], @@ -422,7 +422,7 @@ class DateTimePlusTest extends TestCase { * * @see testInvalidDates */ - public function providerTestInvalidDates() { + public static function providerTestInvalidDates() { return [ // Test for invalid month names when we are using a short version // of the month. @@ -449,7 +449,7 @@ class DateTimePlusTest extends TestCase { * * @see testInvalidDateArrays */ - public function providerTestInvalidDateArrays() { + public static function providerTestInvalidDateArrays() { return [ // One year larger than the documented upper limit of checkdate(). [['year' => 32768, 'month' => 1, 'day' => 8, 'hour' => 8, 'minute' => 0, 'second' => 0], 'America/Chicago', \InvalidArgumentException::class], @@ -476,7 +476,7 @@ class DateTimePlusTest extends TestCase { * * @see testCheckArray */ - public function providerTestCheckArray() { + public static function providerTestCheckArray() { return [ 'Date array, date only' => [['year' => 2010, 'month' => 2, 'day' => 28], TRUE], 'Date array with hour' => [['year' => 2010, 'month' => 2, 'day' => 28, 'hour' => 10], TRUE], @@ -502,7 +502,7 @@ class DateTimePlusTest extends TestCase { * * @see testDateTimezone */ - public function providerTestDateTimezone() { + public static function providerTestDateTimezone() { // Use a common date for most of the tests. $date_string = '2007-01-31 21:00:00'; @@ -531,7 +531,7 @@ class DateTimePlusTest extends TestCase { * * @see testTimestamp() */ - public function providerTestTimestamp() { + public static function providerTestTimestamp() { return [ // Create date object from a unix timestamp and display it in // local time. @@ -583,7 +583,7 @@ class DateTimePlusTest extends TestCase { * * @see testDateTimestamp() */ - public function providerTestDateTimestamp() { + public static function providerTestDateTimestamp() { return [ // Create date object from datetime string in UTC, and convert // it to a local date. @@ -652,7 +652,7 @@ class DateTimePlusTest extends TestCase { * * @see DateTimePlusTest::testDateDiff() */ - public function providerTestDateDiff() { + public static function providerTestDateDiff() { $empty_interval = new \DateInterval('PT0S'); @@ -730,7 +730,7 @@ class DateTimePlusTest extends TestCase { * * @see DateTimePlusTest::testInvalidDateDiff() */ - public function providerTestInvalidDateDiff() { + public static function providerTestInvalidDateDiff() { return [ [ 'input1' => DateTimePlus::createFromFormat('U', 3600), @@ -770,7 +770,7 @@ class DateTimePlusTest extends TestCase { * @return array * An array of invalid date/time strings, and corresponding error messages. */ - public function providerTestInvalidConstructor() { + public static function providerTestInvalidConstructor() { return [ [ 'YYYY-MM-DD', diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php index 6f628103352..3883c0d945d 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php @@ -121,7 +121,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper { * - aliases as returned by ContainerBuilder. * - aliases as expected in the container definition. */ - public function getAliasesDataProvider() { + public static function getAliasesDataProvider() { return [ [[], []], [ @@ -166,7 +166,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper { * - parameters as expected in the container definition. * - frozen value */ - public function getParametersDataProvider() { + public static function getParametersDataProvider() { return [ [[], [], TRUE], [ @@ -546,7 +546,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper { $this->assertEquals(static::serializeDefinition($data), $dump['services']['foo'], 'Expected definition matches dump.'); } - public function publicPrivateDataProvider() { + public static function publicPrivateDataProvider() { return [ [TRUE], [FALSE], @@ -688,7 +688,7 @@ namespace Drupal\Tests\Component\DependencyInjection\Dumper { * - expected final value. * - escaped value in service definition. */ - public function percentsEscapeProvider() { + public static function percentsEscapeProvider() { return [ ['%foo%', '%%foo%%'], ['foo%bar%', 'foo%%bar%%'], diff --git a/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php b/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php index b0f25967fc7..9016dd483f4 100644 --- a/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php +++ b/core/tests/Drupal/Tests/Component/Diff/DiffFormatterTest.php @@ -23,7 +23,7 @@ class DiffFormatterTest extends TestCase { * - First array of text to diff. * - Second array of text to diff. */ - public function provideTestDiff() { + public static function provideTestDiff() { return [ 'empty' => ['', [], []], 'add' => [ diff --git a/core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php b/core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php index 6c169fcb6df..29143ca9b2b 100644 --- a/core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php +++ b/core/tests/Drupal/Tests/Component/Diff/DiffOpOutputBuilderTest.php @@ -26,7 +26,7 @@ class DiffOpOutputBuilderTest extends TestCase { * - An array of strings to change from. * - An array of strings to change to. */ - public function provideTestDiff(): array { + public static function provideTestDiff(): array { return [ 'empty' => [[], [], []], 'add' => [[new DiffOpAdd(['a'])], [], ['a']], diff --git a/core/tests/Drupal/Tests/Component/Diff/Engine/DiffEngineTest.php b/core/tests/Drupal/Tests/Component/Diff/Engine/DiffEngineTest.php index dce6e52b2cb..231b3c99919 100644 --- a/core/tests/Drupal/Tests/Component/Diff/Engine/DiffEngineTest.php +++ b/core/tests/Drupal/Tests/Component/Diff/Engine/DiffEngineTest.php @@ -31,7 +31,7 @@ class DiffEngineTest extends TestCase { * - An array of strings to change from. * - An array of strings to change to. */ - public function provideTestDiff() { + public static function provideTestDiff() { return [ 'empty' => [[], [], []], 'add' => [[DiffOpAdd::class], [], ['a']], diff --git a/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php b/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php index 6364a6143ba..bcaf935eabd 100644 --- a/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php +++ b/core/tests/Drupal/Tests/Component/Diff/Engine/HWLDFWordAccumulatorTest.php @@ -36,7 +36,7 @@ class HWLDFWordAccumulatorTest extends TestCase { * - Array of strings for the $words parameter to addWords(). * - String tag for the $tag parameter to addWords(). */ - public function provideAddWords() { + public static function provideAddWords() { return [ [['wordword2'], ['word', 'word2'], 'tag'], [['word', 'word2'], ['word', "\nword2"], 'tag'], diff --git a/core/tests/Drupal/Tests/Component/DrupalComponentTest.php b/core/tests/Drupal/Tests/Component/DrupalComponentTest.php index 09e356765d3..8291c746496 100644 --- a/core/tests/Drupal/Tests/Component/DrupalComponentTest.php +++ b/core/tests/Drupal/Tests/Component/DrupalComponentTest.php @@ -113,7 +113,7 @@ class DrupalComponentTest extends TestCase { * - TRUE if the test passes, FALSE otherwise. * - File data as a string. This will be used as a virtual file. */ - public function providerAssertNoCoreUsage() { + public static function providerAssertNoCoreUsage() { return [ [ TRUE, diff --git a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php index c340f14630b..39a5095525b 100644 --- a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php +++ b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php @@ -33,7 +33,7 @@ class RegexDirectoryIteratorTest extends TestCase { /** * Provider for self::testRegexDirectoryIterator(). */ - public function providerTestRegexDirectoryIterator() { + public static function providerTestRegexDirectoryIterator() { return [ [ [ diff --git a/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php index c0ba7cf6ff1..54d7914475a 100644 --- a/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php +++ b/core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php @@ -49,7 +49,7 @@ class PoHeaderTest extends TestCase { * Pairs of plural expressions and expected plural positions keyed by plural * value. */ - public function providerTestPluralsFormula() { + public static function providerTestPluralsFormula() { return [ [ 'nplurals=1; plural=0;', diff --git a/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php b/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php index f120955571d..d18888eecdd 100644 --- a/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php +++ b/core/tests/Drupal/Tests/Component/Gettext/PoStreamWriterTest.php @@ -90,7 +90,7 @@ class PoStreamWriterTest extends TestCase { * - Written content. * - Content longer than 10 bytes. */ - public function providerWriteData() { + public static function providerWriteData() { // cSpell:disable return [ ['', '', FALSE], diff --git a/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php b/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php index e48973a39f6..4a6c28eae11 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Context/ContextTest.php @@ -16,7 +16,7 @@ class ContextTest extends TestCase { /** * Data provider for testGetContextValue. */ - public function providerGetContextValue() { + public static function providerGetContextValue() { return [ ['context_value', 'context_value', FALSE, 'data_type'], [NULL, NULL, FALSE, 'data_type'], @@ -84,7 +84,7 @@ class ContextTest extends TestCase { /** * Data provider for testHasContextValue. */ - public function providerHasContextValue() { + public static function providerHasContextValue() { return [ [TRUE, FALSE], [TRUE, 0], diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php index 28577e83c25..6b7c905c28f 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/AnnotatedClassDiscoveryTest.php @@ -24,7 +24,7 @@ class AnnotatedClassDiscoveryTest extends TestCase { * * @var string[] */ - public function provideBadAnnotations() { + public static function provideBadAnnotations() { return [ ['addtogroup'], ['code'], diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php index c6466ba6690..ca63bff0cda 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryCachedTraitTest.php @@ -22,7 +22,7 @@ class DiscoveryCachedTraitTest extends TestCase { * - Definitions to be returned by getDefinitions(). * - Plugin name to query for. */ - public function providerGetDefinition() { + public static function providerGetDefinition() { return [ ['definition', [], ['plugin_name' => 'definition'], 'plugin_name'], ['definition', ['plugin_name' => 'definition'], [], 'plugin_name'], diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php index b18c95c0c3e..fce4210daec 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php @@ -21,7 +21,7 @@ class DiscoveryTraitTest extends TestCase { * - Plugin definition array, to pass to doGetDefinition(). * - Plugin ID to get, passed to doGetDefinition(). */ - public function providerDoGetDefinition() { + public static function providerDoGetDefinition() { return [ ['definition', ['plugin_name' => 'definition'], 'plugin_name'], [NULL, ['plugin_name' => 'definition'], 'bad_plugin_name'], @@ -52,7 +52,7 @@ class DiscoveryTraitTest extends TestCase { * - Plugin definition array, to pass to doGetDefinition(). * - Plugin ID to get, passed to doGetDefinition(). */ - public function providerDoGetDefinitionException() { + public static function providerDoGetDefinitionException() { return [ [FALSE, ['plugin_name' => 'definition'], 'bad_plugin_name'], ]; @@ -117,7 +117,7 @@ class DiscoveryTraitTest extends TestCase { * - Expected TRUE or FALSE. * - Plugin ID to look for. */ - public function providerHasDefinition() { + public static function providerHasDefinition() { return [ [TRUE, 'valid'], [FALSE, 'not_valid'], diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php index b05a7be5028..ef640f5dbf7 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/StaticDiscoveryDecoratorTest.php @@ -44,7 +44,7 @@ class StaticDiscoveryDecoratorTest extends TestCase { * - A plugin definition. * - Base plugin ID. */ - public function providerGetDefinition() { + public static function providerGetDefinition() { return [ ['is_defined', TRUE, FALSE, ['plugin-definition' => 'is_defined'], 'plugin-definition'], // Make sure we don't call the decorated method if we shouldn't. @@ -116,7 +116,7 @@ class StaticDiscoveryDecoratorTest extends TestCase { * - bool Whether the test mock has a callback. * - array Plugin definitions. */ - public function providerGetDefinitions() { + public static function providerGetDefinitions() { return [ [TRUE, ['definition' => 'is_fake']], [FALSE, ['definition' => 'array_of_stuff']], @@ -181,7 +181,7 @@ class StaticDiscoveryDecoratorTest extends TestCase { * - Array of arguments to pass to the method, with the expectation that our * mocked __call() will return them. */ - public function providerCall() { + public static function providerCall() { return [ ['complexArguments', ['1', 2.0, 3, ['4' => 'five']]], ['noArguments', []], diff --git a/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php b/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php index d4446b18863..ccacab19e64 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php @@ -25,7 +25,7 @@ class ReflectionFactoryTest extends TestCase { * - $plugin_definition parameter to getInstanceArguments(). * - $configuration parameter to getInstanceArguments(). */ - public function providerGetInstanceArguments() { + public static function providerGetInstanceArguments() { return [ [ ['arguments_plugin_id'], diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php index f90fd02a925..e33cf214a75 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php @@ -31,7 +31,7 @@ class PluginBaseTest extends TestCase { * * @return array */ - public function providerTestGetPluginId() { + public static function providerTestGetPluginId() { return [ ['base_id', 'base_id'], ['base_id:derivative', 'base_id:derivative'], @@ -58,7 +58,7 @@ class PluginBaseTest extends TestCase { * * @return array */ - public function providerTestGetBaseId() { + public static function providerTestGetBaseId() { return [ ['base_id', 'base_id'], ['base_id:derivative', 'base_id'], @@ -85,7 +85,7 @@ class PluginBaseTest extends TestCase { * * @return array */ - public function providerTestGetDerivativeId() { + public static function providerTestGetDerivativeId() { return [ ['base_id', NULL], ['base_id:derivative', 'derivative'], diff --git a/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php index 57a79b185cf..06a50ebd5bc 100644 --- a/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php +++ b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php @@ -69,7 +69,7 @@ class FormattableMarkupTest extends TestCase { * * @return array */ - public function providerTestNullPlaceholder() { + public static function providerTestNullPlaceholder() { return [ ['', '@empty', ['@empty' => NULL], 'Deprecated NULL placeholder value for key (@empty) in: "@empty". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826'], ['', ':empty', [':empty' => NULL], 'Deprecated NULL placeholder value for key (:empty) in: ":empty". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826'], @@ -117,7 +117,7 @@ class FormattableMarkupTest extends TestCase { * * @return array */ - public function providerTestUnexpectedPlaceholder() { + public static function providerTestUnexpectedPlaceholder() { return [ ['Non alpha, non-allowed starting character: ~placeholder', ['~placeholder' => 'replaced'], E_USER_WARNING, 'Placeholders must begin with one of the following "@", ":" or "%", invalid placeholder (~placeholder) with string: "Non alpha, non-allowed starting character: ~placeholder"'], ['Alpha starting character: placeholder', ['placeholder' => 'replaced'], NULL, ''], diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php index 473de7a5eb8..e6ed083aff4 100644 --- a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php +++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php @@ -125,7 +125,7 @@ class YamlTest extends TestCase { /** * Data provider that lists all YAML files in core. */ - public function providerYamlFilesInCore() { + public static function providerYamlFilesInCore() { $files = []; $dirs = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(__DIR__ . '/../../../../../', \RecursiveDirectoryIterator::FOLLOW_SYMLINKS)); foreach ($dirs as $dir) { diff --git a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php index fa7f8ab14f0..91efbb75866 100644 --- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php +++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php @@ -41,7 +41,7 @@ class PhpTransliterationTest extends TestCase { * An array of arrays, each containing the parameters for * self::testRemoveDiacritics(). */ - public function providerTestPhpTransliterationRemoveDiacritics() { + public static function providerTestPhpTransliterationRemoveDiacritics() { // cSpell:disable return [ // Test all characters in the Unicode range 0x00bf to 0x017f. diff --git a/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php b/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php index 5411e6d15a5..c20e800a7f9 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php @@ -33,7 +33,7 @@ class ArgumentsResolverTest extends TestCase { /** * Provides test data to testGetArgument(). */ - public function providerTestGetArgument() { + public static function providerTestGetArgument() { $data = []; // Test an optional parameter with no provided value. @@ -183,7 +183,7 @@ class ArgumentsResolverTest extends TestCase { /** * Provides test data to testHandleUnresolvedArgument(). */ - public function providerTestHandleUnresolvedArgument() { + public static function providerTestHandleUnresolvedArgument() { $data = []; $data[] = [function ($foo) {}]; $data[] = [[new TestClass(), 'access']]; diff --git a/core/tests/Drupal/Tests/Component/Utility/BytesTest.php b/core/tests/Drupal/Tests/Component/Utility/BytesTest.php index b9294b6cae3..3ec6e091316 100644 --- a/core/tests/Drupal/Tests/Component/Utility/BytesTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/BytesTest.php @@ -44,7 +44,7 @@ class BytesTest extends TestCase { * \Drupal\Component\Utility\Bytes::toNumber(): size, and the expected * return value with the expected type (float). */ - public function providerTestToNumber(): array { + public static function providerTestToNumber(): array { return [ ['1', 1.0], ['1 byte', 1.0], @@ -98,7 +98,7 @@ class BytesTest extends TestCase { * \Drupal\Component\Utility\Bytes::validate(): string, and the expected * return value with the expected type (bool). */ - public function providerTestValidate(): array { + public static function providerTestValidate(): array { return [ // String not starting with a number. ['foo', FALSE], diff --git a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php index d3b457e3f20..3f898346935 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php @@ -31,7 +31,7 @@ class ColorTest extends TestCase { /** * Provides data for testValidateHex(). */ - public function providerTestValidateHex() { + public static function providerTestValidateHex() { return [ // Tests length. [FALSE, ''], @@ -98,7 +98,7 @@ class ColorTest extends TestCase { * - The rgb color array value. * - (optional) Boolean indicating invalid status. Defaults to FALSE. */ - public function providerTestHexToRgb() { + public static function providerTestHexToRgb() { $invalid = []; // Any invalid arguments should throw an exception. foreach (['', '-1', '1', '12', '12345', '1234567', '123456789', '123456789a', 'foo'] as $value) { @@ -155,7 +155,7 @@ class ColorTest extends TestCase { * - The rgb color array value. * - The hex color value. */ - public function providerTestRbgToHex() { + public static function providerTestRbgToHex() { // Input using named RGB array (e.g., as returned by Color::hexToRgb()). $tests = [ [['red' => 0, 'green' => 0, 'blue' => 0], '#000000'], @@ -184,7 +184,7 @@ class ColorTest extends TestCase { * - The hex color value. * - The 6 character length hex color value. */ - public function providerTestNormalizeHexLength() { + public static function providerTestNormalizeHexLength() { $data = [ ['#000', '#000000'], ['#FFF', '#FFFFFF'], diff --git a/core/tests/Drupal/Tests/Component/Utility/CryptTest.php b/core/tests/Drupal/Tests/Component/Utility/CryptTest.php index 8894d9cf21c..b85bbcf9274 100644 --- a/core/tests/Drupal/Tests/Component/Utility/CryptTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/CryptTest.php @@ -71,7 +71,7 @@ class CryptTest extends TestCase { * * @return array Test data. */ - public function providerTestHashBase64() { + public static function providerTestHashBase64() { return [ [ 'data' => 'The SHA (Secure Hash Algorithm) is one of a number of cryptographic hash functions. A cryptographic hash is like a signature for a text or a data file. SHA-256 algorithm generates an almost-unique, fixed size 256-bit (32-byte) hash. Hash is a one way function – it cannot be decrypted back. This makes it suitable for password validation, challenge hash authentication, anti-tamper, digital signatures.', @@ -91,7 +91,7 @@ class CryptTest extends TestCase { * * @return array Test data. */ - public function providerTestHmacBase64() { + public static function providerTestHmacBase64() { return [ [ 'data' => 'Calculates a base-64 encoded, URL-safe sha-256 hmac.', @@ -107,7 +107,7 @@ class CryptTest extends TestCase { * * @return array Test data. */ - public function providerTestHmacBase64Invalid() { + public static function providerTestHmacBase64Invalid() { return [ [new \stdClass(), new \stdClass()], [new \stdClass(), 'string'], diff --git a/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php b/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php index 10a5c2800a8..7f0ef7f0c96 100644 --- a/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php @@ -45,7 +45,7 @@ class EnvironmentTest extends TestCase { * \Drupal\Component\Utility\Environment::checkMemoryLimit(): * required and memory_limit, and the expected return value. */ - public function providerTestCheckMemoryLimit() { + public static function providerTestCheckMemoryLimit() { return [ // Minimal amount of memory should be available. ['30MB', NULL, TRUE], diff --git a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php index 32dea1dfa5c..1f6cadd2bd3 100644 --- a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php @@ -64,7 +64,7 @@ class HtmlTest extends TestCase { * @return array * Test data. */ - public function providerTestCleanCssIdentifier() { + public static function providerTestCleanCssIdentifier() { $id1 = 'abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789'; $id2 = '¡¢£¤¥'; $id3 = 'css__identifier__with__double__underscores'; @@ -132,7 +132,7 @@ class HtmlTest extends TestCase { * @return array * Test data. */ - public function providerTestHtmlGetUniqueId() { + public static function providerTestHtmlGetUniqueId() { // cSpell:disable $id = 'abcdefghijklmnopqrstuvwxyz-0123456789'; return [ @@ -184,7 +184,7 @@ class HtmlTest extends TestCase { * @return array * Test data. */ - public function providerTestHtmlGetUniqueIdWithAjaxIds() { + public static function providerTestHtmlGetUniqueIdWithAjaxIds() { return [ ['test-unique-id1--', 'test-unique-id1'], // Note, we truncate two hyphens at the end. @@ -217,7 +217,7 @@ class HtmlTest extends TestCase { * @return array * Test data. */ - public function providerTestHtmlGetId() { + public static function providerTestHtmlGetId() { // cSpell:disable $id = 'abcdefghijklmnopqrstuvwxyz-0123456789'; return [ @@ -249,7 +249,7 @@ class HtmlTest extends TestCase { * * @see testDecodeEntities() */ - public function providerDecodeEntities() { + public static function providerDecodeEntities() { return [ ['Drupal', 'Drupal'], ['<script>', '<script>'], @@ -290,7 +290,7 @@ class HtmlTest extends TestCase { * * @see testEscape() */ - public function providerEscape() { + public static function providerEscape() { return [ ['Drupal', 'Drupal'], ['<script>', '<script>'], @@ -364,7 +364,7 @@ class HtmlTest extends TestCase { * @return array * Test data. */ - public function providerTestTransformRootRelativeUrlsToAbsolute() { + public static function providerTestTransformRootRelativeUrlsToAbsolute() { $data = []; // Random generator. @@ -409,7 +409,7 @@ class HtmlTest extends TestCase { * @return array * Test data. */ - public function providerTestTransformRootRelativeUrlsToAbsoluteAssertion() { + public static function providerTestTransformRootRelativeUrlsToAbsoluteAssertion() { return [ 'only relative path' => ['llama'], 'only root-relative path' => ['/llama'], diff --git a/core/tests/Drupal/Tests/Component/Utility/ImageTest.php b/core/tests/Drupal/Tests/Component/Utility/ImageTest.php index 5860e9bea30..c41af317910 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ImageTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ImageTest.php @@ -44,7 +44,7 @@ class ImageTest extends TestCase { * * @see testScaleDimensions() */ - public function providerTestScaleDimensions() { + public static function providerTestScaleDimensions() { // Define input / output datasets to test different branch conditions. $tests = []; diff --git a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php index f6f68739482..f1d4436a5cf 100644 --- a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php @@ -264,7 +264,7 @@ class NestedArrayTest extends TestCase { $this->assertEquals($expected, NestedArray::filter($array, $callable)); } - public function providerTestFilter() { + public static function providerTestFilter() { $data = []; $data['1d-array'] = [ [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE], diff --git a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php index f719ec07a34..3e06711db90 100644 --- a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php @@ -145,7 +145,7 @@ class NumberTest extends TestCase { * - The integer value. * - The alphadecimal value. */ - public function providerTestConversions() { + public static function providerTestConversions() { return [ [0, '00'], [1, '01'], diff --git a/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php b/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php index 47d1c0c7a0a..79d42ff079d 100644 --- a/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/RectangleTest.php @@ -96,7 +96,7 @@ class RectangleTest extends TestCase { * * @see testRotateDimensions() */ - public function providerPhp55RotateDimensions() { + public static function providerPhp55RotateDimensions() { // The dataset is stored in a .json file because it is very large and causes // problems for PHPCS. return json_decode(file_get_contents(__DIR__ . '/fixtures/RectangleTest.json')); diff --git a/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php b/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php index f82392b189e..1b15c34f331 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php @@ -31,7 +31,7 @@ class ReflectionTest extends TestCase { * * @return array[] */ - public function providerGetParameterClassName() { + public static function providerGetParameterClassName() { $reflection_method = new \ReflectionMethod(static::class, 'existsForTesting'); $parameters = $reflection_method->getParameters(); return [ diff --git a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php index 34b191184cd..f23aaf4bd87 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php @@ -44,7 +44,7 @@ class SortArrayTest extends TestCase { * * @see \Drupal\Tests\Component\Utility\SortArrayTest::testSortByWeightElement() */ - public function providerSortByWeightElement() { + public static function providerSortByWeightElement() { $tests = []; // Weights set and equal. @@ -120,7 +120,7 @@ class SortArrayTest extends TestCase { * * @see \Drupal\Tests\Component\Utility\SortArrayTest::testSortByWeightProperty() */ - public function providerSortByWeightProperty() { + public static function providerSortByWeightProperty() { $tests = []; // Weights set and equal. @@ -196,7 +196,7 @@ class SortArrayTest extends TestCase { * * @see \Drupal\Tests\Component\Utility\SortArrayTest::testSortByTitleElement() */ - public function providerSortByTitleElement() { + public static function providerSortByTitleElement() { $tests = []; // Titles set and equal. @@ -265,7 +265,7 @@ class SortArrayTest extends TestCase { * * @see \Drupal\Tests\Component\Utility\SortArrayTest::testSortByTitleProperty() */ - public function providerSortByTitleProperty() { + public static function providerSortByTitleProperty() { $tests = []; // Titles set and equal. diff --git a/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php index 4c9d301337f..6dfe031dd12 100644 --- a/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php @@ -36,7 +36,7 @@ class UnicodeTest extends TestCase { * @return array * An array containing a string and its uppercase first version. */ - public function providerUcfirst() { + public static function providerUcfirst() { // cSpell:disable return [ ['tHe QUIcK bRoWn', 'THe QUIcK bRoWn'], @@ -67,7 +67,7 @@ class UnicodeTest extends TestCase { * @return array * An array containing a string and its lowercase version. */ - public function providerLcfirst() { + public static function providerLcfirst() { // cSpell:disable return [ ['tHe QUIcK bRoWn', 'tHe QUIcK bRoWn'], @@ -98,7 +98,7 @@ class UnicodeTest extends TestCase { * @return array * An array containing a string and its capitalized version. */ - public function providerUcwords() { + public static function providerUcwords() { // cSpell:disable return [ ['tHe QUIcK bRoWn', 'THe QUIcK BRoWn'], @@ -136,7 +136,7 @@ class UnicodeTest extends TestCase { * - (optional) Boolean for the $wordsafe flag. Defaults to FALSE. * - (optional) Boolean for the $add_ellipsis flag. Defaults to FALSE. */ - public function providerTruncate() { + public static function providerTruncate() { // cSpell:disable $tests = [ ['frànçAIS is über-åwesome', 24, 'frànçAIS is über-åwesome'], @@ -229,7 +229,7 @@ EOF; * An array of arrays, each containing the parameters to * self::testTruncateBytes(). */ - public function providerTestTruncateBytes() { + public static function providerTestTruncateBytes() { return [ // String shorter than max length. ['Short string', 42, 'Short string'], @@ -266,7 +266,7 @@ EOF; * An array of arrays, each containing the parameters for * self::testValidateUtf8(). */ - public function providerTestValidateUtf8() { + public static function providerTestValidateUtf8() { return [ // Empty string. ['', TRUE, 'An empty string did not validate.'], @@ -303,7 +303,7 @@ EOF; * An array of arrays, each containing the parameters to * self::testConvertUtf8(). } */ - public function providerTestConvertToUtf8() { + public static function providerTestConvertToUtf8() { return [ [chr(0x97), 'Windows-1252', '—'], [chr(0x99), 'Windows-1252', '™'], diff --git a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php index da578931b3e..c21fff98369 100644 --- a/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php @@ -19,7 +19,7 @@ class UrlHelperTest extends TestCase { * * @return array */ - public function providerTestBuildQuery() { + public static function providerTestBuildQuery() { return [ [['a' => ' &#//+%20@۞'], 'a=%20%26%23//%2B%2520%40%DB%9E', 'Value was properly encoded.'], [[' &#//+%20@۞' => 'a'], '%20%26%23%2F%2F%2B%2520%40%DB%9E=a', 'Key was properly encoded.'], @@ -607,7 +607,7 @@ class UrlHelperTest extends TestCase { * * @see \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocal() */ - public function providerTestExternalIsLocal() { + public static function providerTestExternalIsLocal() { return [ // Different mixes of trailing slash. ['http://example.com', 'http://example.com', TRUE], @@ -660,7 +660,7 @@ class UrlHelperTest extends TestCase { * * @see \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid() */ - public function providerTestExternalIsLocalInvalid() { + public static function providerTestExternalIsLocalInvalid() { return [ ['http://example.com/foo', ''], ['http://example.com/foo', 'bar'], diff --git a/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php b/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php index d19292c62de..5a20f8df079 100644 --- a/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php @@ -86,7 +86,7 @@ class UserAgentTest extends TestCase { * - An accept-language string. * - Expected best matching language code. */ - public function providerTestGetBestMatchingLangcode() { + public static function providerTestGetBestMatchingLangcode() { // Random generator. $random = new Random(); diff --git a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php index 196f0db029c..0df91d37e95 100644 --- a/core/tests/Drupal/Tests/Component/Utility/VariableTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/VariableTest.php @@ -23,7 +23,7 @@ class VariableTest extends TestCase { * @return array[] * Sets of arguments to pass to the test method. */ - public function providerCallableToString(): array { + public static function providerCallableToString(): array { $mock = VariableTestMock::class; return [ 'string' => [ @@ -91,7 +91,7 @@ class VariableTest extends TestCase { * - The expected export string. * - The variable to export. */ - public function providerTestExport() { + public static function providerTestExport() { return [ // Array. [ diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php index 0f242959ebe..f781306dc83 100644 --- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php @@ -93,7 +93,7 @@ class XssTest extends TestCase { * - (optional) The allowed HTML tags array that should be passed to * \Drupal\Component\Utility\Xss::filter(). */ - public function providerTestFilterXssNormalized() { + public static function providerTestFilterXssNormalized() { return [ [ "Who's Online", @@ -160,7 +160,7 @@ class XssTest extends TestCase { * - (optional) The allowed HTML tags array that should be passed to * \Drupal\Component\Utility\Xss::filter(). */ - public function providerTestFilterXssNotNormalized() { + public static function providerTestFilterXssNotNormalized() { $cases = [ // Tag stripping, different ways to work around removal of HTML tags. [ @@ -465,7 +465,7 @@ class XssTest extends TestCase { * - The value to expect after filtering. * - The assertion message. */ - public function providerTestInvalidMultiByte() { + public static function providerTestInvalidMultiByte() { return [ ["Foo\xC0barbaz", '', 'Xss::filter() accepted invalid sequence "Foo\xC0barbaz"'], ["Fooÿñ", "Fooÿñ", 'Xss::filter() rejects valid sequence Fooÿñ"'], @@ -495,7 +495,7 @@ class XssTest extends TestCase { /** * Data provider for testFilterXssAdminNotNormalized(). */ - public function providerTestAttributes() { + public static function providerTestAttributes() { return [ [ '<img src="http://example.com/foo.jpg" title="Example: title" alt="Example: alt" class="md:block">', @@ -601,7 +601,7 @@ class XssTest extends TestCase { * - The value to expect after filtering. * - The assertion message. */ - public function providerTestFilterXssAdminNotNormalized() { + public static function providerTestFilterXssAdminNotNormalized() { return [ // DRUPAL-SA-2008-044 ['<object />', 'object', 'Admin HTML filter -- should not allow object tag.'], diff --git a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php index 3170d7ce075..77a5ed1fb96 100644 --- a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php +++ b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php @@ -41,7 +41,7 @@ class UuidTest extends TestCase { * * @return array */ - public function providerUuidInstances() { + public static function providerUuidInstances() { $instances = []; $instances[][] = new Php(); @@ -84,7 +84,7 @@ class UuidTest extends TestCase { * - (bool) Whether or not the Uuid is valid. * - Failure message. */ - public function providerTestValidation() { + public static function providerTestValidation() { return [ // These valid UUIDs. ['6ba7b810-9dad-11d1-80b4-00c04fd430c8', TRUE, 'Basic FQDN UUID did not validate'], diff --git a/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php b/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php index ca4b9701ef7..a41153b4ee8 100644 --- a/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php +++ b/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php @@ -20,7 +20,7 @@ class BuilderTest extends TestCase { /** * Provides test data for testBuilder. */ - public function builderTestData() { + public static function builderTestData() { return [ [ DrupalCoreRecommendedBuilder::class, diff --git a/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php b/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php index 664ffd7a73a..dcadfe9989c 100644 --- a/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php +++ b/core/tests/Drupal/Tests/Composer/Generator/MetapackageUpdateTest.php @@ -22,7 +22,7 @@ class MetapackageUpdateTest extends TestCase { /** * Provides test data for testUpdated. */ - public function updatedTestData() { + public static function updatedTestData() { return [ [ DrupalCoreRecommendedBuilder::class, diff --git a/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php b/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php index 69616f7fa63..2b0305f9850 100644 --- a/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php +++ b/core/tests/Drupal/Tests/Composer/Generator/OverlapWithTopLevelDependenciesTest.php @@ -16,7 +16,7 @@ class OverlapWithTopLevelDependenciesTest extends TestCase { /** * Provides data for testOverlapWithTemplateProject(). */ - public function templateProjectPathProvider() { + public static function templateProjectPathProvider() { return [ [ 'composer/Template/RecommendedProject', diff --git a/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php b/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php index f1ed7471395..4294472eb53 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php @@ -24,7 +24,7 @@ class ConfigTest extends TestCase { ]); } - public function provideGetMessageText() { + public static function provideGetMessageText() { return [ [[], []], [ diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php index 55ecf23c99c..eeef34bc571 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php @@ -137,7 +137,7 @@ class ScaffoldTest extends TestCase { /** * Data provider for testScaffoldWithExpectedException. */ - public function scaffoldExpectedExceptionTestValues() { + public static function scaffoldExpectedExceptionTestValues() { return [ [ 'drupal-drupal-missing-scaffold-file', @@ -200,7 +200,7 @@ class ScaffoldTest extends TestCase { $this->assertAutoloadFileCorrect($result->docroot()); } - public function scaffoldOverridingSettingsExcludingHtaccessValues() { + public static function scaffoldOverridingSettingsExcludingHtaccessValues() { return [ [ 'drupal-composer-drupal-project', diff --git a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php index 0a5fcee9c45..e98ee24373b 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php @@ -172,7 +172,7 @@ class VendorHardeningPluginTest extends TestCase { $this->assertFileExists($dir . '/web.config'); } - public function providerFindBinOverlap() { + public static function providerFindBinOverlap() { return [ [ [], diff --git a/core/tests/Drupal/Tests/ComposerIntegrationTest.php b/core/tests/Drupal/Tests/ComposerIntegrationTest.php index dedd1872922..f37883e9ac4 100644 --- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php +++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php @@ -135,7 +135,7 @@ class ComposerIntegrationTest extends UnitTestCase { * * @return array */ - public function providerTestExpectedScaffoldFiles() { + public static function providerTestExpectedScaffoldFiles() { return [ ['.editorconfig', 'assets/scaffold/files/editorconfig', '[project-root]'], ['.gitattributes', 'assets/scaffold/files/gitattributes', '[project-root]'], diff --git a/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php b/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php index 3b66a4f835a..8048eebf51e 100644 --- a/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php @@ -248,7 +248,7 @@ class AccessManagerTest extends UnitTestCase { * * @see \Drupal\Tests\Core\Access\AccessManagerTest::testCheckConjunctions() */ - public function providerTestCheckConjunctions() { + public static function providerTestCheckConjunctions() { $access_allow = AccessResult::allowed(); $access_deny = AccessResult::neutral(); $access_kill = AccessResult::forbidden(); @@ -507,7 +507,7 @@ class AccessManagerTest extends UnitTestCase { * * @return array */ - public function providerCheckException() { + public static function providerCheckException() { return [ [[1]], ['string'], diff --git a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php index ae25925f294..f9cd0e838c6 100644 --- a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php +++ b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php @@ -584,7 +584,7 @@ class AccessResultTest extends UnitTestCase { * does not implement CacheableDependencyInterface, then the result won't * either. This is the case for bullets 3, 6 and 9 in the set above. */ - public function andOrCacheabilityPropagationProvider() { + public static function andOrCacheabilityPropagationProvider() { // ct: cacheable=true, cf: cacheable=false, un: uncacheable. // Note: the test cases that have a "un" access result as the first operand // test UncacheableTestAccessResult, not AccessResult. However, we @@ -940,7 +940,7 @@ class AccessResultTest extends UnitTestCase { * * @return array */ - public function providerTestAllowedIfHasPermissions() { + public static function providerTestAllowedIfHasPermissions() { $access_result = AccessResult::allowedIf(FALSE); $data[] = [[], 'AND', $access_result]; $data[] = [[], 'OR', $access_result]; diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php index f81f9960b0d..ea71f5e23ed 100644 --- a/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php @@ -157,7 +157,7 @@ class CsrfTokenGeneratorTest extends UnitTestCase { * @return array * An array of data used by the test. */ - public function providerTestValidateParameterTypes() { + public static function providerTestValidateParameterTypes() { return [ [[], ''], [TRUE, 'foo'], @@ -189,7 +189,7 @@ class CsrfTokenGeneratorTest extends UnitTestCase { * @return array * An array of data used by the test. */ - public function providerTestInvalidParameterTypes() { + public static function providerTestInvalidParameterTypes() { return [ [NULL, new \stdClass()], [0, []], diff --git a/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php b/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php index 1f6b02bc188..8b92157a111 100644 --- a/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php +++ b/core/tests/Drupal/Tests/Core/Ajax/AjaxCommandsTest.php @@ -43,7 +43,7 @@ class AjaxCommandsTest extends UnitTestCase { * - Array of css elements * - Expected value */ - public function providerCss() { + public static function providerCss() { return [ 'empty' => [ [], @@ -196,7 +196,7 @@ class AjaxCommandsTest extends UnitTestCase { /** * Data provider for testAnnounceCommand(). */ - public function announceCommandProvider() { + public static function announceCommandProvider() { return [ 'no priority' => [ 'Things are going to change!', diff --git a/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php index 845e624685a..48ef5569271 100644 --- a/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php +++ b/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php @@ -58,7 +58,7 @@ class PluralTranslationTest extends UnitTestCase { new PluralTranslation($data); } - public function providerTestMissingData() { + public static function providerTestMissingData() { $data = []; $data['all-missing'] = [[]]; $data['singular-missing'] = [['plural' => 'muh']]; diff --git a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php index 41c53115e99..4546b38a831 100644 --- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php @@ -146,7 +146,7 @@ class AssetResolverTest extends UnitTestCase { $this->assertCount($expected_cache_item_count * 2, $this->cache->getAllCids()); } - public function providerAttachedAssets() { + public static function providerAttachedAssets() { $time = time(); return [ 'same libraries, different timestamps' => [ diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php index bf3071056b9..18fb5b7f712 100644 --- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php @@ -80,7 +80,7 @@ class CssCollectionRendererUnitTest extends UnitTestCase { * * @see testRender */ - public function providerTestRender() { + public static function providerTestRender() { $create_link_element = function ($href, $media = 'all', $custom_attributes = []) { $attributes = [ 'rel' => 'stylesheet', diff --git a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php index 318f2c62b0e..2b7033ac8e1 100644 --- a/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php @@ -52,7 +52,7 @@ class CssOptimizerUnitTest extends UnitTestCase { /** * Provides data for the CSS asset optimizing test. */ - public function providerTestOptimize() { + public static function providerTestOptimize() { $path = 'core/tests/Drupal/Tests/Core/Asset/css_test_files/'; $absolute_path = dirname(__FILE__) . '/css_test_files/'; return [ diff --git a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php index d698dcda170..e1da45e626a 100644 --- a/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/JsOptimizerUnitTest.php @@ -38,7 +38,7 @@ class JsOptimizerUnitTest extends UnitTestCase { * @return array * An array of test data. */ - public function providerTestClean() { + public static function providerTestClean() { $path = dirname(__FILE__) . '/js_test_files/'; return [ // File. Tests: @@ -85,7 +85,7 @@ class JsOptimizerUnitTest extends UnitTestCase { * @return array * An array of test data. */ - public function providerTestOptimize() { + public static function providerTestOptimize() { $path = dirname(__FILE__) . '/js_test_files/'; return [ 0 => [ diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php index 40327713c06..705461e915e 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php @@ -73,7 +73,7 @@ class LibraryDependencyResolverTest extends UnitTestCase { /** * Provides test data for ::testGetLibrariesWithDependencies(). */ - public function providerTestGetLibrariesWithDependencies() { + public static function providerTestGetLibrariesWithDependencies() { return [ // Empty list of libraries. [[], []], @@ -125,7 +125,7 @@ class LibraryDependencyResolverTest extends UnitTestCase { /** * Provides test data for ::testGetMinimalRepresentativeSubset(). */ - public function providerTestGetMinimalRepresentativeSubset() { + public static function providerTestGetMinimalRepresentativeSubset() { return [ // Empty list of libraries. [[], []], diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php index aee09bc92bd..3724faaf3f0 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php @@ -756,7 +756,7 @@ class LibraryDiscoveryParserTest extends UnitTestCase { /** * Data provider for testing bad CSS declarations. */ - public function providerTestCssAssert() { + public static function providerTestCssAssert() { return [ 'css_bad_category' => ['css_bad_category', 'See https://www.drupal.org/node/2274843.'], 'Improper CSS nesting' => ['css_bad_nesting', 'CSS must be nested under a category. See https://www.drupal.org/node/2274843.'], diff --git a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php index d67b3309584..c988388f73d 100644 --- a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php @@ -64,7 +64,7 @@ class AuthenticationManagerTest extends UnitTestCase { /** * Provides data to self::testDefaultFilter(). */ - public function providerTestDefaultFilter() { + public static function providerTestDefaultFilter() { $data = []; // No route, cookie is global, should apply. $data[] = [TRUE, FALSE, [], 'cookie', TRUE]; diff --git a/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php b/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php index 128f4d5da8d..58009604f43 100644 --- a/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php +++ b/core/tests/Drupal/Tests/Core/Batch/PercentagesTest.php @@ -32,7 +32,7 @@ class PercentagesTest extends UnitTestCase { * @return array * An array of data used by the test. */ - public function providerTestPercentages() { + public static function providerTestPercentages() { // Set up an array of test cases. return [ // array(total, current, expected). diff --git a/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php b/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php index 0ac1f6c775c..5d4d2cbf4e1 100644 --- a/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php @@ -47,7 +47,7 @@ class BlockBaseTest extends UnitTestCase { /** * Provides data for testGetMachineNameSuggestion(). */ - public function providerTestGetMachineNameSuggestion() { + public static function providerTestGetMachineNameSuggestion() { return [ ['Admin label', 'adminlabel'], // cspell:disable-next-line diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php index 71090f46c24..8d14805b3ca 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php @@ -53,7 +53,7 @@ class CacheTest extends UnitTestCase { * * @return array */ - public function mergeTagsProvider() { + public static function mergeTagsProvider() { return [ [[], [], []], [['bar', 'foo'], ['bar'], ['foo']], @@ -80,7 +80,7 @@ class CacheTest extends UnitTestCase { * * @return array */ - public function mergeMaxAgesProvider() { + public static function mergeMaxAgesProvider() { return [ [Cache::PERMANENT, Cache::PERMANENT, Cache::PERMANENT], [60, 60, 60], @@ -119,7 +119,7 @@ class CacheTest extends UnitTestCase { * * @return array */ - public function mergeCacheContextsProvide() { + public static function mergeCacheContextsProvide() { return [ [[], [], []], [['foo'], [], ['foo']], @@ -158,7 +158,7 @@ class CacheTest extends UnitTestCase { * * @return array */ - public function buildTagsProvider() { + public static function buildTagsProvider() { return [ ['node', [1], ['node:1']], ['node', [1, 2, 3], ['node:1', 'node:2', 'node:3']], diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php index d0b4c2f6536..09fb21469a0 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php @@ -68,7 +68,7 @@ class CacheableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestMerge() { + public static function providerTestMerge() { return [ // All empty. [(new CacheableMetadata()), (new CacheableMetadata()), (new CacheableMetadata())], @@ -122,7 +122,7 @@ class CacheableMetadataTest extends UnitTestCase { /** * Data provider for testSetCacheMaxAge. */ - public function providerSetCacheMaxAge() { + public static function providerSetCacheMaxAge() { return [ [0 , FALSE], ['http', TRUE], @@ -147,7 +147,7 @@ class CacheableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestCreateFromRenderArray() { + public static function providerTestCreateFromRenderArray() { $data = []; $empty_metadata = new CacheableMetadata(); @@ -183,7 +183,7 @@ class CacheableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestCreateFromObject() { + public static function providerTestCreateFromObject() { $data = []; $empty_metadata = new CacheableMetadata(); diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php index 0ba6ac354b3..51afa3a9d42 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @@ -66,7 +66,7 @@ class CacheContextsManagerTest extends UnitTestCase { /** * Provides a list of context token sets. */ - public function providerTestOptimizeTokens() { + public static function providerTestOptimizeTokens() { return [ [['a', 'x'], ['a', 'x']], [['a.b', 'x'], ['a.b', 'x']], @@ -149,7 +149,7 @@ class CacheContextsManagerTest extends UnitTestCase { /** * Provides a list of invalid 'baz' cache contexts: the parameter is missing. */ - public function providerTestInvalidCalculatedContext() { + public static function providerTestInvalidCalculatedContext() { return [ ['baz'], ['baz:'], @@ -200,7 +200,7 @@ class CacheContextsManagerTest extends UnitTestCase { * * @return array */ - public function validateTokensProvider() { + public static function validateTokensProvider() { return [ [[], FALSE], [['foo'], FALSE], diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php index 3dee9fc9475..8eef5a40506 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php @@ -34,7 +34,7 @@ class CookieCacheContextTest extends UnitTestCase { /** * Provides a list of cookies and expected cache contexts. */ - public function providerTestGetContext() { + public static function providerTestGetContext() { return [ [['foo' => 1, 'bar' => 2, 'baz' => 3], 'foo', 1], // Context is ordered by cookie name. diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php index 1a946b5760a..f691ffe9da5 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/HeadersCacheContextTest.php @@ -34,7 +34,7 @@ class HeadersCacheContextTest extends UnitTestCase { /** * Provides a list of headers and expected cache contexts. */ - public function providerTestGetContext() { + public static function providerTestGetContext() { return [ [[], NULL, ''], [[], 'foo', ''], diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php index 440e0e5c07d..1d5b652ddbc 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php @@ -31,7 +31,7 @@ class PathParentCacheContextTest extends UnitTestCase { /** * Provides a list of paths and expected cache contexts. */ - public function providerTestGetContext() { + public static function providerTestGetContext() { return [ ['/some/path', 'some'], ['/some/other-path', 'some'], diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php index 72f1de4094a..673cd4cc387 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/ProtocolVersionCacheContextTest.php @@ -32,7 +32,7 @@ class ProtocolVersionCacheContextTest extends UnitTestCase { /** * Provides a list of query arguments and expected cache contexts. */ - public function providerTestGetContext() { + public static function providerTestGetContext() { return [ ['HTTP/1.0', 'HTTP/1.0'], ['HTTP/1.1', 'HTTP/1.1'], diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php index ae8009f24f2..4ed09f3ae4d 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/QueryArgsCacheContextTest.php @@ -31,7 +31,7 @@ class QueryArgsCacheContextTest extends UnitTestCase { /** * Provides a list of query arguments and expected cache contexts. */ - public function providerTestGetContext() { + public static function providerTestGetContext() { return [ [[], NULL, ''], [[], 'foo', ''], diff --git a/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php b/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php index d2c3ad1dd54..93666f28daf 100644 --- a/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php @@ -37,7 +37,7 @@ class DatabaseBackendFactoryTest extends UnitTestCase { $this->assertSame($expected_max_rows_bar, $database_backend_factory->get('bar')->getMaxRows()); } - public function getProvider() { + public static function getProvider() { return [ 'default' => [ [], diff --git a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php index f2fd29e16dc..49321a4fa2a 100644 --- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php +++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php @@ -19,7 +19,7 @@ class AttributesTest extends UnitTestCase { * * @return array */ - public function providerTestAttributeData() { + public static function providerTestAttributeData() { return [ // Verify that special characters are HTML encoded. [['&"\'<>' => 'value'], ' &"'<>="value"', 'HTML encode attribute names.'], diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php index 92a6342c262..a84b4f22bc5 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigDependencyManagerTest.php @@ -25,7 +25,7 @@ class ConfigDependencyManagerTest extends UnitTestCase { $this->assertEquals($expected_order, $dependency_manager->sortAll()); } - public function providerTestSortAll() { + public static function providerTestSortAll() { $datasets[] = [ [ 'provider.entity_b' => [], diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php index d4ba1b1a063..8a01635b81f 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php @@ -26,7 +26,7 @@ class ConfigFactoryOverrideBaseTest extends UnitTestCase { $this->assertEquals($override_data_after, $override_data_before); } - public function providerTestFilterNestedArray() { + public static function providerTestFilterNestedArray() { $data = []; $data['empty'] = [ [], diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php index 1bdc3cbd28a..29032f8f54d 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php @@ -94,7 +94,7 @@ class ConfigTest extends UnitTestCase { * * @see \Drupal\Tests\Core\Config\ConfigTest::testSetName() */ - public function setNameProvider() { + public static function setNameProvider() { return [ // Valid name with dot. [ @@ -400,7 +400,7 @@ class ConfigTest extends UnitTestCase { * * @see \Drupal\Tests\Core\Config\ConfigTest::testMerge() */ - public function mergeDataProvider() { + public static function mergeDataProvider() { return [ [ // Data. @@ -435,7 +435,7 @@ class ConfigTest extends UnitTestCase { * * @see \Drupal\Tests\Core\Config\ConfigTest::testValidateNameException() */ - public function validateNameProvider() { + public static function validateNameProvider() { $return = [ // Name missing namespace (dot). [ @@ -465,7 +465,7 @@ class ConfigTest extends UnitTestCase { * @see \Drupal\Tests\Core\Config\ConfigTest::testOverrideData() * @see \Drupal\Tests\Core\Config\ConfigTest::testDelete() */ - public function overrideDataProvider() { + public static function overrideDataProvider() { $test_cases = [ [ // Original data. @@ -539,7 +539,7 @@ class ConfigTest extends UnitTestCase { * * @see \Drupal\Tests\Core\Config\ConfigTest::testClear() */ - public function simpleDataProvider() { + public static function simpleDataProvider() { return [ [ [ @@ -560,7 +560,7 @@ class ConfigTest extends UnitTestCase { * @see \Drupal\Tests\Core\Config\ConfigTest::testInitWithData() * @see \Drupal\Tests\Core\Config\ConfigTest::testNestedClear() */ - public function nestedDataProvider() { + public static function nestedDataProvider() { return [ [ [ diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php index 09b47a11c3d..9b22d95d0b6 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php @@ -140,7 +140,7 @@ class ConfigEntityTypeTest extends UnitTestCase { /** * Provides test data. */ - public function providerTestGetConfigPrefix() { + public static function providerTestGetConfigPrefix() { return [ [['provider' => 'node', 'id' => 'node_type', 'config_prefix' => 'type'], 'node.type'], [['provider' => 'views', 'id' => 'view'], 'views.view'], @@ -162,7 +162,7 @@ class ConfigEntityTypeTest extends UnitTestCase { $this->assertSame($expected, $properties_to_export); } - public function providerGetPropertiesToExport() { + public static function providerGetPropertiesToExport() { $data = []; $data[] = [ [ diff --git a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php index 69855da4c9c..980d5fd4721 100644 --- a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php @@ -67,7 +67,7 @@ class ReadOnlyStorageTest extends UnitTestCase { * @return array * The data. */ - public function readMethodsProvider() { + public static function readMethodsProvider() { $fixture = [ StorageInterface::DEFAULT_COLLECTION => ['config.a', 'config.b', 'other.a'], ]; diff --git a/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php b/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php index 9b13f9328a5..aa30d1028f0 100644 --- a/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php @@ -68,7 +68,7 @@ class StorageCopyTraitTest extends UnitTestCase { /** * Provides data for testCheckRequirements(). */ - public function providerTestReplaceStorageContents() { + public static function providerTestReplaceStorageContents() { $data = []; $data[] = [TRUE, TRUE]; $data[] = [TRUE, FALSE]; diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php index 2f0335f2422..7ba733c18fa 100644 --- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php @@ -63,7 +63,7 @@ class ControllerResolverTest extends UnitTestCase { /** * Provides test data for testCreateController(). */ - public function providerTestCreateController() { + public static function providerTestCreateController() { return [ // Tests class::method. ['Drupal\Tests\Core\Controller\MockController::getResult', 'Drupal\Tests\Core\Controller\MockController', 'This is a regular controller.'], @@ -111,7 +111,7 @@ class ControllerResolverTest extends UnitTestCase { /** * Provides test data for testGetController(). */ - public function providerTestGetController() { + public static function providerTestGetController() { return [ // Tests passing a controller via the request. [['_controller' => 'Drupal\Tests\Core\Controller\MockContainerAware::getResult'], 'Drupal\Tests\Core\Controller\MockContainerAware', 'This is container aware.'], @@ -134,7 +134,7 @@ class ControllerResolverTest extends UnitTestCase { /** * Provides test data for testGetControllerFromDefinition(). */ - public function providerTestGetControllerFromDefinition() { + public static function providerTestGetControllerFromDefinition() { return [ // Tests a method on an object. [[new MockController(), 'getResult'], 'This is a regular controller.'], diff --git a/core/tests/Drupal/Tests/Core/Cron/CronSuspendQueueDelayTest.php b/core/tests/Drupal/Tests/Core/Cron/CronSuspendQueueDelayTest.php index 2738682e995..687e75e154f 100644 --- a/core/tests/Drupal/Tests/Core/Cron/CronSuspendQueueDelayTest.php +++ b/core/tests/Drupal/Tests/Core/Cron/CronSuspendQueueDelayTest.php @@ -285,7 +285,7 @@ final class CronSuspendQueueDelayTest extends UnitTestCase { * @return array * Scenarios for testing. */ - public function providerSuspendQueueThreshold(): array { + public static function providerSuspendQueueThreshold(): array { $scenarios = []; $scenarios['cron will wait for the queue, and rerun'] = [ 15.0, diff --git a/core/tests/Drupal/Tests/Core/CronTest.php b/core/tests/Drupal/Tests/Core/CronTest.php index 09d3d5325b8..226c3e8cdac 100644 --- a/core/tests/Drupal/Tests/Core/CronTest.php +++ b/core/tests/Drupal/Tests/Core/CronTest.php @@ -172,7 +172,7 @@ class CronTest extends UnitTestCase { /** * Data provider for ::testProcessQueues() method. */ - public function processQueuesTestData() { + public static function processQueuesTestData() { return [ ['Complete', 'assertFalse', 0], ['Exception', 'assertTrue', 1], diff --git a/core/tests/Drupal/Tests/Core/Database/ConditionTest.php b/core/tests/Drupal/Tests/Core/Database/ConditionTest.php index 4e6908694bc..0cd5b4fcd3c 100644 --- a/core/tests/Drupal/Tests/Core/Database/ConditionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/ConditionTest.php @@ -27,7 +27,7 @@ class ConditionTest extends UnitTestCase { * - Expected result for the string version of the condition. * - The field name to input in the condition. */ - public function providerSimpleCondition() { + public static function providerSimpleCondition() { return [ ['name = :db_condition_placeholder_0', 'name'], ['name123 = :db_condition_placeholder_0', 'name-123'], @@ -113,7 +113,7 @@ class ConditionTest extends UnitTestCase { * * @return array */ - public function dataProviderTestCompileWithKnownOperators() { + public static function dataProviderTestCompileWithKnownOperators() { // Below are a list of commented out test cases, which should work but // aren't directly supported by core, but instead need manual handling with // prefix/suffix at the moment. @@ -173,7 +173,7 @@ class ConditionTest extends UnitTestCase { $condition->compile($connection, $query_placeholder); } - public function providerTestCompileWithSqlInjectionForOperator() { + public static function providerTestCompileWithSqlInjectionForOperator() { $data = []; $data[] = ["IS NOT NULL) ;INSERT INTO {test} (name) VALUES ('test12345678'); -- "]; $data[] = ["IS NOT NULL) UNION ALL SELECT name, pass FROM {users_field_data} -- "]; diff --git a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php index 2522a894761..7447460984e 100644 --- a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php @@ -28,7 +28,7 @@ class ConnectionTest extends UnitTestCase { * - Arguments to pass to Connection::setPrefix(). * - Expected result from Connection::tablePrefix(). */ - public function providerPrefixRoundTrip() { + public static function providerPrefixRoundTrip() { return [ [ [ @@ -77,7 +77,7 @@ class ConnectionTest extends UnitTestCase { * - Query to be prefixed. * - Quote identifier. */ - public function providerTestPrefixTables() { + public static function providerTestPrefixTables() { return [ [ 'SELECT * FROM test_table', @@ -126,7 +126,7 @@ class ConnectionTest extends UnitTestCase { * - Namespace. * - Class name without namespace. */ - public function providerGetDriverClass() { + public static function providerGetDriverClass() { return [ [ 'nonexistent_class', @@ -355,7 +355,7 @@ class ConnectionTest extends UnitTestCase { * - Driver for PDO connection. * - Namespace for connection. */ - public function providerSchema() { + public static function providerSchema() { return [ [ 'Drupal\\Tests\\Core\\Database\\Stub\\Driver\\Schema', @@ -385,7 +385,7 @@ class ConnectionTest extends UnitTestCase { * - Expected filtered comment. * - Arguments for Connection::makeComment(). */ - public function providerMakeComments() { + public static function providerMakeComments() { return [ [ '/* */ ', @@ -421,7 +421,7 @@ class ConnectionTest extends UnitTestCase { * - Expected filtered comment. * - Comment to filter. */ - public function providerFilterComments() { + public static function providerFilterComments() { return [ ['', ''], ['Exploit * / DROP TABLE node. --', 'Exploit * / DROP TABLE node; --'], @@ -456,7 +456,7 @@ class ConnectionTest extends UnitTestCase { * testEscapeField. The first value is the expected value, and the second * value is the value to test. */ - public function providerEscapeTables() { + public static function providerEscapeTables() { return [ ['nocase', 'nocase'], ['camelCase', 'camelCase'], @@ -491,7 +491,7 @@ class ConnectionTest extends UnitTestCase { * - Expected escaped string. * - String to escape. */ - public function providerEscapeAlias() { + public static function providerEscapeAlias() { return [ ['!nocase!', 'nocase', ['!', '!']], ['`backtick`', 'backtick', ['`', '`']], @@ -522,7 +522,7 @@ class ConnectionTest extends UnitTestCase { * - Expected escaped string. * - String to escape. */ - public function providerEscapeFields() { + public static function providerEscapeFields() { return [ ['/title/', 'title', ['/', '/']], ['`backtick`', 'backtick', ['`', '`']], @@ -556,7 +556,7 @@ class ConnectionTest extends UnitTestCase { * testEscapeField. The first value is the expected value, and the second * value is the value to test. */ - public function providerEscapeDatabase() { + public static function providerEscapeDatabase() { return [ ['/name/', 'name', ['/', '/']], ['`backtick`', 'backtick', ['`', '`']], @@ -628,7 +628,7 @@ class ConnectionTest extends UnitTestCase { * - Padded query. * - Query options. */ - public function provideQueriesToTrim() { + public static function provideQueriesToTrim() { return [ 'remove_non_breaking_space' => [ 'SELECT * FROM test', @@ -735,7 +735,7 @@ class ConnectionTest extends UnitTestCase { * * @see ::testFindCallerFromDebugBacktraceWithMockedBacktrace() */ - public function providerMockedBacktrace(): array { + public static function providerMockedBacktrace(): array { $stack = [ [ 'file' => '/var/www/core/lib/Drupal/Core/Database/Log.php', diff --git a/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php b/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php index 38f518fc9f2..87a62f9026a 100644 --- a/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php +++ b/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php @@ -88,7 +88,7 @@ class DatabaseTest extends UnitTestCase { * * @return array */ - public function providerFindDriverAutoloadDirectory() { + public static function providerFindDriverAutoloadDirectory() { return [ 'core mysql' => ['core/modules/mysql/src/Driver/Database/mysql/', 'Drupal\mysql\Driver\Database\mysql', FALSE], 'D8 custom fake' => [FALSE, 'Drupal\Driver\Database\CoreFake', TRUE], @@ -113,7 +113,7 @@ class DatabaseTest extends UnitTestCase { * * @return array */ - public function providerFindDriverAutoloadDirectoryException() { + public static function providerFindDriverAutoloadDirectoryException() { return [ 'test module but tests not included' => [ "The database_driver Drupal\driver_test\Driver\Database\DrivertestMysql does not exist.", diff --git a/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php b/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php index 460fe112937..85ee0d5fd7c 100644 --- a/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php +++ b/core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php @@ -59,7 +59,7 @@ class InstallerObjectTest extends UnitTestCase { * - namespace: The namespace providing the driver. * - class: The fully qualified class name of the expected install task. */ - public function providerDbInstallerObject() { + public static function providerDbInstallerObject() { return [ // A driver only in the core namespace. ['mysql', "Drupal\\mysql\\Driver\\Database\\mysql", MysqlInstallTasks::class], diff --git a/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php b/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php index 9610b524989..aa978be52e6 100644 --- a/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php @@ -24,7 +24,7 @@ class RowCountExceptionTest extends UnitTestCase { * * @return array */ - public function providerTestExceptionMessage() { + public static function providerTestExceptionMessage() { return [ [static::DEFAULT_EXCEPTION_MESSAGE, ''], ['test', 'test'], diff --git a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php index 6f87304b590..c2e8f135233 100644 --- a/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php @@ -41,7 +41,7 @@ class UrlConversionTest extends UnitTestCase { * - url: The full URL string to be tested. * - database_array: An array containing the expected results. */ - public function providerConvertDbUrlToConnectionInfo() { + public static function providerConvertDbUrlToConnectionInfo() { $root = dirname(__FILE__, 7); return [ 'MySql without prefix' => [ @@ -293,7 +293,7 @@ class UrlConversionTest extends UnitTestCase { * - Drupal root string. * - The expected exception message. */ - public function providerInvalidArgumentsUrlConversion() { + public static function providerInvalidArgumentsUrlConversion() { return [ ['foo', '', "Missing scheme in URL 'foo'"], ['foo', 'bar', "Missing scheme in URL 'foo'"], @@ -325,7 +325,7 @@ class UrlConversionTest extends UnitTestCase { * database, username, password, prefix, host, port, namespace and driver. * - The expected URL after conversion. */ - public function providerGetConnectionInfoAsUrl() { + public static function providerGetConnectionInfoAsUrl() { $info1 = [ 'database' => 'test_database', 'username' => 'test_user', @@ -477,7 +477,7 @@ class UrlConversionTest extends UnitTestCase { * database, username, password, prefix, host, port, namespace and driver. * - The expected exception message. */ - public function providerInvalidArgumentGetConnectionInfoAsUrl() { + public static function providerInvalidArgumentGetConnectionInfoAsUrl() { return [ 'Missing database key' => [ [ diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php index e9295ad379b..41ca72ba1ff 100644 --- a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php @@ -60,7 +60,7 @@ class DateHelperTest extends UnitTestCase { $this->assertSame($expected, DateHelper::weekDaysOrdered($weekdays)); } - public function providerTestWeekDaysOrdered() { + public static function providerTestWeekDaysOrdered() { $data = []; $data[] = [ 0, diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php index c9010bdcd7c..39d9c54850f 100644 --- a/core/tests/Drupal/Tests/Core/Datetime/DateTest.php +++ b/core/tests/Drupal/Tests/Core/Datetime/DateTest.php @@ -124,7 +124,7 @@ class DateTest extends UnitTestCase { /** * Provides some test data for the format interval test. */ - public function providerTestFormatInterval() { + public static function providerTestFormatInterval() { $data = [ // Checks for basic seconds. [1, 1, '1 sec'], diff --git a/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php b/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php index fc0213793f1..53467b6d789 100644 --- a/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php +++ b/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php @@ -62,7 +62,7 @@ class DrupalDateTimeTest extends UnitTestCase { * * @see DrupalDateTimeTest::testDateDiff() */ - public function providerTestDateDiff() { + public static function providerTestDateDiff() { $settings = ['langcode' => 'en']; @@ -145,7 +145,7 @@ class DrupalDateTimeTest extends UnitTestCase { * * @see DateTimePlusTest::testInvalidDateDiff() */ - public function providerTestInvalidDateDiff() { + public static function providerTestInvalidDateDiff() { $settings = ['langcode' => 'en']; $utc_tz = new \DateTimeZone('UTC'); return [ diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php index 7f55c404fb2..dcf9c974afa 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php @@ -80,7 +80,7 @@ YAML; $yaml_file_loader->load('vfs://drupal/modules/example/example.yml'); } - public function providerTestExceptions() { + public static function providerTestExceptions() { return [ '_defaults must be an array' => [<<<YAML services: diff --git a/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php b/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php index 71a39d0cfb9..e8555b9bc3f 100644 --- a/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php +++ b/core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php @@ -87,7 +87,7 @@ class DisplayVariantTest extends UnitTestCase { /** * Provides test data for testGetConfiguration(). */ - public function providerTestGetConfiguration() { + public static function providerTestGetConfiguration() { $data = []; $data[] = [ [], diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php index 8c86bd922e1..dee0d58572a 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php @@ -55,7 +55,7 @@ class DrupalKernelTest extends UnitTestCase { /** * Provides test data for testTrustedHosts(). */ - public function providerTestTrustedHosts() { + public static function providerTestTrustedHosts() { $data = []; // Tests canonical URL. diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php index 8e440aefff9..4be76598eeb 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php @@ -28,7 +28,7 @@ class ValidateHostnameTest extends UnitTestCase { /** * Provides test data for testValidateHostname(). */ - public function providerTestValidateHostname() { + public static function providerTestValidateHostname() { $data = []; // Verifies that DrupalKernel::validateHostname() prevents invalid diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php index 6d7951bc974..bb56a7e78bf 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php @@ -360,7 +360,7 @@ class ContentEntityBaseUnitTest extends UnitTestCase { * - A bool whether to provide a bundle-specific definition. * - A bool whether to provide an entity type-specific definition. */ - public function providerTestTypedData(): array { + public static function providerTestTypedData(): array { return [ 'Entity data definition derivative with entity type and bundle' => [ TRUE, @@ -534,7 +534,7 @@ class ContentEntityBaseUnitTest extends UnitTestCase { * - Language code for $activeLanguage. * - Fields array for $fields. */ - public function providerGet() { + public static function providerGet() { return [ // Populated fields array. ['result', 'field_name', 'langcode', ['field_name' => ['langcode' => 'result']]], @@ -596,7 +596,7 @@ class ContentEntityBaseUnitTest extends UnitTestCase { * Drupal\Core\Field\FieldDefinitionInterface object will be mocked for * each name. */ - public function providerGetFields() { + public static function providerGetFields() { return [ [[], FALSE, FALSE, []], [['field' => 'field', 'field2' => 'field2'], TRUE, FALSE, ['field', 'field2']], diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php index 7e93fa4f70c..66b4e94d0cd 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityCreateAccessCheckTest.php @@ -47,7 +47,7 @@ class EntityCreateAccessCheckTest extends UnitTestCase { * * @return array */ - public function providerTestAccess() { + public static function providerTestAccess() { $no_access = FALSE; $access = TRUE; diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php index cf2293b8d3f..0a896645408 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php @@ -361,7 +361,7 @@ class EntityFieldManagerTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode() { + public static function providerTestGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode() { return [ ['default_langcode'], ['custom_default_langcode_key'], @@ -405,7 +405,7 @@ class EntityFieldManagerTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode() { + public static function providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode() { return [ [FALSE, TRUE, TRUE], [TRUE, FALSE, TRUE], diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php index 3712b7fac62..8e30610eab4 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php @@ -72,7 +72,7 @@ class EntityFormTest extends UnitTestCase { /** * Provides test data for testFormId(). */ - public function providerTestFormIds() { + public static function providerTestFormIds() { return [ [ 'node_article_form', diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php index 1398c4503d8..ab3003c78e1 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php @@ -115,7 +115,7 @@ class EntityLinkTest extends UnitTestCase { /** * Provides test data for testLink(). */ - public function providerTestLink() { + public static function providerTestLink() { $data = []; $data[] = [ 'some_entity_label', diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php index cdb68553e45..49ae87a2cf9 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php @@ -86,7 +86,7 @@ class EntityResolverManagerTest extends UnitTestCase { /** * Data provider for testSetRouteOptionsWithStandardRoute. */ - public function providerTestSetRouteOptionsWithStandardRoute() { + public static function providerTestSetRouteOptionsWithStandardRoute() { return [ ['Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerMethod'], ['Drupal\Tests\Core\Entity\test_function_controller'], @@ -116,7 +116,7 @@ class EntityResolverManagerTest extends UnitTestCase { /** * Data provider for testSetRouteOptionsWithStandardRouteWithArgument. */ - public function providerTestSetRouteOptionsWithStandardRouteWithArgument() { + public static function providerTestSetRouteOptionsWithStandardRouteWithArgument() { return [ ['Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerMethodWithArgument'], ['Drupal\Tests\Core\Entity\test_function_controller_with_argument'], @@ -146,7 +146,7 @@ class EntityResolverManagerTest extends UnitTestCase { /** * Data provider for testSetRouteOptionsWithContentController. */ - public function providerTestSetRouteOptionsWithContentController() { + public static function providerTestSetRouteOptionsWithContentController() { return [ ['Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerMethodWithArgument'], ['Drupal\Tests\Core\Entity\test_function_controller_with_argument'], @@ -179,7 +179,7 @@ class EntityResolverManagerTest extends UnitTestCase { /** * Data provider for testSetRouteOptionsWithEntityTypeNoUpcasting. */ - public function providerTestSetRouteOptionsWithEntityTypeNoUpcasting() { + public static function providerTestSetRouteOptionsWithEntityTypeNoUpcasting() { return [ ['Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerWithEntityNoUpcasting'], ['Drupal\Tests\Core\Entity\test_function_controller_no_upcasting'], @@ -213,7 +213,7 @@ class EntityResolverManagerTest extends UnitTestCase { /** * Data provider for testSetRouteOptionsWithEntityTypeUpcasting. */ - public function providerTestSetRouteOptionsWithEntityTypeUpcasting() { + public static function providerTestSetRouteOptionsWithEntityTypeUpcasting() { return [ ['Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerWithEntityUpcasting'], ['Drupal\Tests\Core\Entity\test_function_controller_entity_upcasting'], diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php index 6482dd91e2e..256a06e9448 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php @@ -189,7 +189,7 @@ class EntityTypeBundleInfoTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestGetBundleInfo() { + public static function providerTestGetBundleInfo() { return [ [ 'apple', diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php index 9c192c55b55..4e74f073501 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php @@ -157,7 +157,7 @@ class EntityTypeManagerTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestHasHandler() { + public static function providerTestHasHandler() { return [ ['apple', TRUE], ['banana', FALSE], @@ -288,7 +288,7 @@ class EntityTypeManagerTest extends UnitTestCase { * @return array * Test data. */ - public function provideMissingHandlerData() : array { + public static function provideMissingHandlerData() : array { return [ 'missing_handler' => [ 'test_entity_type', @@ -391,7 +391,7 @@ class EntityTypeManagerTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestGetDefinition() { + public static function providerTestGetDefinition() { return [ ['apple', TRUE], ['banana', TRUE], diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php index 2a2c510d141..071b5d41912 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php @@ -95,7 +95,7 @@ class EntityTypeTest extends UnitTestCase { /** * Provides test data for testGet. */ - public function providerTestGet() { + public static function providerTestGet() { return [ [[], 'provider', NULL], [['provider' => ''], 'provider', ''], @@ -109,7 +109,7 @@ class EntityTypeTest extends UnitTestCase { /** * Provides test data for testSet. */ - public function providerTestSet() { + public static function providerTestSet() { return [ ['provider', NULL], ['provider', ''], @@ -123,7 +123,7 @@ class EntityTypeTest extends UnitTestCase { /** * Provides test data. */ - public function providerTestGetKeys() { + public static function providerTestGetKeys() { return [ [[], ['revision' => '', 'bundle' => '', 'langcode' => '']], [['id' => 'id'], ['id' => 'id', 'revision' => '', 'bundle' => '', 'langcode' => '']], @@ -433,7 +433,7 @@ class EntityTypeTest extends UnitTestCase { /** * Provides test data for ::testGetBundleLabel(). */ - public function providerTestGetBundleLabel() { + public static function providerTestGetBundleLabel() { return [ [['label' => 'Entity Label Foo'], 'Entity Label Foo bundle'], [['bundle_label' => 'Bundle Label Bar'], 'Bundle Label Bar'], diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php index 8e1bf3b2efa..85dc0eebdf0 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php @@ -189,7 +189,7 @@ class EntityUrlTest extends UnitTestCase { * @return array * An array of test cases for testToUrlLinkTemplates(). */ - public function providerTestToUrlLinkTemplates() { + public static function providerTestToUrlLinkTemplates() { $test_cases = []; $test_cases['canonical'] = ['canonical', 'entity.test_entity.canonical']; @@ -284,7 +284,7 @@ class EntityUrlTest extends UnitTestCase { * @return array * An array of test cases for testToUrlLinkTemplateNoId(). */ - public function providerTestToUrlLinkTemplateNoId() { + public static function providerTestToUrlLinkTemplateNoId() { $test_cases = []; $test_cases['collection'] = ['collection', 'entity.test_entity.collection']; @@ -377,7 +377,7 @@ class EntityUrlTest extends UnitTestCase { * @return array * An array of test cases for testToUrlUriCallbackUndefined(). */ - public function providerTestToUrlUriCallbackUndefined() { + public static function providerTestToUrlUriCallbackUndefined() { $test_cases = []; $test_cases['no_callback'] = [[], NULL]; diff --git a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php index fd72a312cb3..b7e4ce30f9a 100644 --- a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php @@ -344,7 +344,7 @@ class FieldDefinitionTest extends UnitTestCase { /** * A data provider for all the types of factories that can create definitions. */ - public function factoryTypeProvider() { + public static function factoryTypeProvider() { return [ '::createFromFieldStorageDefinition factory' => [ 'createFromFieldStorageDefinition', diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php index cd97ea8b379..7351ae89439 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php @@ -323,7 +323,7 @@ class DefaultTableMappingTest extends UnitTestCase { * field name, base field status, list of field columns, name of the column * to be retrieved, expected result, whether an exception is expected. */ - public function providerTestGetFieldColumnName() { + public static function providerTestGetFieldColumnName() { $data = []; // Base field with single column. $data[] = [TRUE, ['foo'], 'foo', 'test']; @@ -416,7 +416,7 @@ class DefaultTableMappingTest extends UnitTestCase { * A nested array where each inner array has the following values: a list of * table names and the expected table name. */ - public function providerTestGetFieldTableName() { + public static function providerTestGetFieldTableName() { $data = []; $data[] = [['data' => 'data_table', 'base' => 'base_table', 'revision' => 'revision_table'], 'data_table']; @@ -496,7 +496,7 @@ class DefaultTableMappingTest extends UnitTestCase { * consisting of the entity type ID, field name and a table prefix, followed * by the expected data table name and the revision table name. */ - public function providerTestGetDedicatedTableName() { + public static function providerTestGetDedicatedTableName() { $data = []; $data['short entity type; short field name; no prefix'] = [ diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php index 3cc96f3ce8b..66fac780ca4 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @@ -1581,7 +1581,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { /** * Provides data for testCastValue(). */ - public function providerSchemaCastValue() { + public static function providerSchemaCastValue() { $cases = []; // Tests NULL values. $cases[] = [ diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index 3031589477b..f4374c2964f 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -173,7 +173,7 @@ class SqlContentEntityStorageTest extends UnitTestCase { * value of SqlContentEntityStorage::getBaseTable() as the second * value. */ - public function providerTestGetBaseTable() { + public static function providerTestGetBaseTable() { return [ // Test that the entity type's base table is used, if provided. ['entity_test', 'entity_test'], @@ -221,7 +221,7 @@ class SqlContentEntityStorageTest extends UnitTestCase { * return value of SqlContentEntityStorage::getRevisionTable() as the * second value. */ - public function providerTestGetRevisionTable() { + public static function providerTestGetRevisionTable() { return [ // Test that the entity type's revision table is used, if provided. ['entity_test_revision', 'entity_test_revision'], @@ -299,7 +299,7 @@ class SqlContentEntityStorageTest extends UnitTestCase { * return value of SqlContentEntityStorage::getRevisionDataTable() as * the second value. */ - public function providerTestGetRevisionDataTable() { + public static function providerTestGetRevisionDataTable() { return [ // Test that the entity type's revision data table is used, if provided. ['entity_test_field_revision', 'entity_test_field_revision'], @@ -526,7 +526,7 @@ class SqlContentEntityStorageTest extends UnitTestCase { * A nested array, where each inner array has a single value being a map of * entity keys to use for the mocked entity type. */ - public function providerTestGetTableMappingSimple() { + public static function providerTestGetTableMappingSimple() { return [ [['id' => 'test_id', 'bundle' => NULL, 'uuid' => NULL]], [['id' => 'test_id', 'bundle' => 'test_bundle', 'uuid' => NULL]], diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php index 5657fa656ab..e25dd83077c 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php @@ -35,7 +35,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase { * * @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter::setLinkActiveClass() */ - public function providerTestSetLinkActiveClass() { + public static function providerTestSetLinkActiveClass() { // Define all the variations that *don't* affect whether or not an // "is-active" class is set, but that should remain unchanged: // - surrounding HTML diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php index 921d3701904..db86952b950 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php @@ -41,7 +41,7 @@ class ExceptionJsonSubscriberTest extends UnitTestCase { $this->assertEquals('application/json', $response->headers->get('Content-Type')); } - public function providerTestOn4xx() { + public static function providerTestOn4xx() { return [ 'uncacheable exception' => [ new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message'), diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php index 3b65d403971..6b9b68be9b7 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php @@ -74,7 +74,7 @@ class ModuleRouteSubscriberTest extends UnitTestCase { /** * Data provider for testRemoveRoute(). */ - public function providerTestRemoveRoute() { + public static function providerTestRemoveRoute() { return [ ['enabled', ['_module_dependencies' => 'enabled'], FALSE], ['disabled', ['_module_dependencies' => 'disabled'], TRUE], diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php index c186267eece..23d8fcd1878 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/OptionsRequestSubscriberTest.php @@ -74,7 +74,7 @@ class OptionsRequestSubscriberTest extends UnitTestCase { $this->assertEquals($expected_header, $response->headers->get('Allow')); } - public function providerTestOnRequestWithOptionsRequest() { + public static function providerTestOnRequestWithOptionsRequest() { $data = []; foreach (['GET', 'POST', 'PATCH', 'PUT', 'DELETE'] as $method) { diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php index 42921760ed7..641120a531f 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php @@ -151,7 +151,7 @@ class RedirectResponseSubscriberTest extends UnitTestCase { /** * Data provider for testDestinationRedirectToExternalUrl(). */ - public function providerTestDestinationRedirectToExternalUrl() { + public static function providerTestDestinationRedirectToExternalUrl() { return [ 'absolute external url' => [new Request(['destination' => 'http://example.com']), 'http://example.com'], 'absolute external url with folder' => [new Request(['destination' => 'http://example.com/foobar']), 'http://example.com/foobar'], @@ -180,7 +180,7 @@ class RedirectResponseSubscriberTest extends UnitTestCase { /** * Data provider for testDestinationRedirectWithInvalidUrl(). */ - public function providerTestDestinationRedirectWithInvalidUrl() { + public static function providerTestDestinationRedirectWithInvalidUrl() { $data = []; $data[] = [new Request(['destination' => '//example:com'])]; $data[] = [new Request(['destination' => '//example:com/test'])]; diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php index b97522dee6e..82961fa886e 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; */ class RssResponseRelativeUrlFilterTest extends UnitTestCase { - public function providerTestOnResponse() { + public static function providerTestOnResponse() { $data = []; $valid_feed = <<<RSS diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php index 179e0995040..e662533bf1d 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php @@ -23,7 +23,7 @@ class SpecialAttributesRouteSubscriberTest extends UnitTestCase { * @return array * An array of invalid routes. */ - public function providerTestOnRouteBuildingInvalidVariables() { + public static function providerTestOnRouteBuildingInvalidVariables() { // Build an array of mock route objects based on paths. $routes = []; $paths = [ @@ -49,7 +49,7 @@ class SpecialAttributesRouteSubscriberTest extends UnitTestCase { * @return array * An array of valid routes. */ - public function providerTestOnRouteBuildingValidVariables() { + public static function providerTestOnRouteBuildingValidVariables() { // Build an array of mock route objects based on paths. $routes = []; $paths = [ diff --git a/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php b/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php index 7f7c281a096..4af0786a1ba 100644 --- a/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/DatabaseDriverListTest.php @@ -59,7 +59,7 @@ class DatabaseDriverListTest extends UnitTestCase { /** * Data provider for testLegacyGetFromDriverName(). */ - public function providerDatabaseDrivers(): array { + public static function providerDatabaseDrivers(): array { return [ ['mysql', 'mysql', 'Drupal\\mysql\\Driver\\Database\\mysql'], ['pgsql', 'pgsql', 'Drupal\\pgsql\\Driver\\Database\\pgsql'], diff --git a/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php b/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php index a57cd28156c..b3f81fd2977 100644 --- a/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/DependencyTest.php @@ -28,7 +28,7 @@ class DependencyTest extends UnitTestCase { /** * Data provider for testCreateFromString. */ - public function providerCreateFromString() { + public static function providerCreateFromString() { $tests = []; $tests['module_name_only'] = ['views', 'views', '', '']; $tests['module_and_project_names'] = ['drupal:views', 'views', 'drupal', '']; diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php index 3e90d94c93d..c5f1f4b7f5d 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php @@ -220,7 +220,7 @@ class ExtensionListTest extends UnitTestCase { /** * DataProvider for testCheckIncompatibility(). */ - public function providerCheckIncompatibility() { + public static function providerCheckIncompatibility() { return [ 'core_incompatible true' => [ [ diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php index 06aa51e53fd..1c6979db064 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionVersionTest.php @@ -65,7 +65,7 @@ class ExtensionVersionTest extends UnitTestCase { * @return mixed[][] * Arrays of version information. */ - public function providerVersionInfos(): array { + public static function providerVersionInfos(): array { // Data provider values are: // - The version number to test. // - Array of expected version information with the following keys: @@ -263,7 +263,7 @@ class ExtensionVersionTest extends UnitTestCase { * @return string[] * The test cases for testInvalidVersionNumber(). */ - public function providerInvalidVersionNumber(): array { + public static function providerInvalidVersionNumber(): array { return static::createKeyedTestCases([ '', '8', @@ -306,7 +306,7 @@ class ExtensionVersionTest extends UnitTestCase { * @return string[] * The test cases for testInvalidVersionCorePrefix(). */ - public function providerInvalidVersionCorePrefix(): array { + public static function providerInvalidVersionCorePrefix(): array { return static::createKeyedTestCases([ '6.x-1.0', '7.x-1.x', @@ -335,7 +335,7 @@ class ExtensionVersionTest extends UnitTestCase { * @return string[] * The test cases for testInvalidBranchCorePrefix(). */ - public function providerInvalidBranchCorePrefix(): array { + public static function providerInvalidBranchCorePrefix(): array { return static::createKeyedTestCases([ '6.x-1.', '7.x-1.', @@ -368,7 +368,7 @@ class ExtensionVersionTest extends UnitTestCase { * @return string[][] * The test cases for testCreateFromSupportBranch(). */ - public function providerCreateFromSupportBranch(): array { + public static function providerCreateFromSupportBranch(): array { // Data provider values are: // - The version number to test. // - Array of expected version information with the following keys: @@ -418,7 +418,7 @@ class ExtensionVersionTest extends UnitTestCase { * @return string[] * The test cases for testInvalidBranch(). */ - public function provideInvalidBranch(): array { + public static function provideInvalidBranch(): array { return self::createKeyedTestCases([ '8.x-1.0', '8.x-2.x', diff --git a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php index bf70c5522d4..4e70611ee37 100644 --- a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php @@ -298,7 +298,7 @@ CORE_INCOMPATIBILITY; /** * Data provider for testCoreIncompatibility(). */ - public function providerCoreIncompatibility() { + public static function providerCoreIncompatibility() { // Remove possible stability suffix to properly parse 11.0-dev. $version = preg_replace('/-dev$/', '', \Drupal::VERSION); [$major, $minor] = explode('.', $version, 2); @@ -412,7 +412,7 @@ INFO; /** * Data provider for testValidLifecycle(). */ - public function providerValidLifecycle() { + public static function providerValidLifecycle() { return [ 'empty' => [ '', @@ -469,7 +469,7 @@ INFO; /** * Data provider for testInvalidLifecycle(). */ - public function providerInvalidLifecycle() { + public static function providerInvalidLifecycle() { return [ 'bogus' => [ 'bogus', @@ -527,7 +527,7 @@ INFO; /** * Data provider for testLifecycleLink(). */ - public function providerLifecycleLink() { + public static function providerLifecycleLink() { return [ 'valid deprecated' => [ ExtensionLifecycle::DEPRECATED, diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php index 19a9d2aabb5..0f112489526 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.php @@ -137,7 +137,7 @@ class ThemeExtensionListTest extends UnitTestCase { * @return array * An array of theme test data. */ - public function providerTestGetBaseThemes() { + public static function providerTestGetBaseThemes() { $data = []; // Tests a theme without any base theme. diff --git a/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php b/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php index 1fa81d6bfb6..b846f9686c9 100644 --- a/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php @@ -26,7 +26,7 @@ class FieldInputValueNormalizerTraitTest extends UnitTestCase { /** * Provides test cases for ::testKeyValueByDelta. */ - public function keyValueByDeltaTestCases() { + public static function keyValueByDeltaTestCases() { return [ 'Integer' => [ 1, diff --git a/core/tests/Drupal/Tests/Core/Field/StringItemTest.php b/core/tests/Drupal/Tests/Core/Field/StringItemTest.php index b3b6cc0aac3..4906337617c 100644 --- a/core/tests/Drupal/Tests/Core/Field/StringItemTest.php +++ b/core/tests/Drupal/Tests/Core/Field/StringItemTest.php @@ -52,7 +52,7 @@ class StringItemTest extends UnitTestCase { * @return array * Test cases. */ - public function providerMaxLength(): array { + public static function providerMaxLength(): array { return [ '32' => [32], '255' => [255], diff --git a/core/tests/Drupal/Tests/Core/Field/UriItemTest.php b/core/tests/Drupal/Tests/Core/Field/UriItemTest.php index 92d88b7ea98..a8fc6710c24 100644 --- a/core/tests/Drupal/Tests/Core/Field/UriItemTest.php +++ b/core/tests/Drupal/Tests/Core/Field/UriItemTest.php @@ -42,7 +42,7 @@ class UriItemTest extends UnitTestCase { * @return array * Test cases. */ - public function providerMaxLength(): array { + public static function providerMaxLength(): array { return [ '32' => [32], '255' => [255], diff --git a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php index f8a3a402a22..4794b5fe44b 100644 --- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php +++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php @@ -113,7 +113,7 @@ class FileSystemTest extends UnitTestCase { $this->assertSame($expected, $this->fileSystem->basename($uri, $suffix)); } - public function providerTestBasename() { + public static function providerTestBasename() { $data = []; $data[] = [ 'public://nested/dir', diff --git a/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php b/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php index c1cf737df9e..17e7bbe1f5b 100644 --- a/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php +++ b/core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php @@ -81,7 +81,7 @@ class FileUploadSanitizeNameEventTest extends UnitTestCase { * @return array * Arrays with original file name. */ - public function provideFilenames() { + public static function provideFilenames() { return [ 'ASCII filename with extension' => [ 'example.txt', diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php index 09e272230ef..ba24a851541 100644 --- a/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php +++ b/core/tests/Drupal/Tests/Core/Form/ConfigTargetTest.php @@ -97,7 +97,7 @@ class ConfigTargetTest extends UnitTestCase { $this->assertSame($expected, $form_state->isCached()); } - public function providerTestFormCacheable(): array { + public static function providerTestFormCacheable(): array { $closure = fn (bool $something): string => $something ? 'Yes' : 'No'; return [ 'No callables' => [TRUE, NULL, NULL], @@ -164,7 +164,7 @@ class ConfigTargetTest extends UnitTestCase { ConfigTarget::fromForm($array_parents, $form); } - public function providerTestFromFormException(): array { + public static function providerTestFromFormException(): array { return [ 'No #config_target' => [ [ @@ -215,7 +215,7 @@ class ConfigTargetTest extends UnitTestCase { new ConfigTarget(...$arguments); } - public function providerMultiTargetWithoutCallables(): \Generator { + public static function providerMultiTargetWithoutCallables(): \Generator { yield "neither callable" => ['foo.settings', ['a', 'b']]; yield "only fromConfig" => ['foo.settings', ['a', 'b'], "intval"]; yield "only toConfig" => ['foo.settings', ['a', 'b'], NULL, "intval"]; diff --git a/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php b/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php index cec16f9e06b..c6934668b31 100644 --- a/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Form/ConfirmFormHelperTest.php @@ -119,7 +119,7 @@ class ConfirmFormHelperTest extends UnitTestCase { /** * Provides test data for testCancelLinkDestination(). */ - public function providerTestCancelLinkDestination() { + public static function providerTestCancelLinkDestination() { $data = []; $data[] = ['baz']; $data[] = ['/baz']; diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php index fe5f2c4d457..d732a212b8b 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @@ -175,7 +175,7 @@ class FormBuilderTest extends FormTestBase { /** * Provides test data for testHandleFormStateResponse(). */ - public function formStateResponseProvider() { + public static function formStateResponseProvider() { return [ ['Symfony\Component\HttpFoundation\Response', 'response'], ['Symfony\Component\HttpFoundation\RedirectResponse', 'redirect'], @@ -335,7 +335,7 @@ class FormBuilderTest extends FormTestBase { /** * Data provider for ::testBuildFormWithTriggeringElement(). */ - public function providerTestBuildFormWithTriggeringElement() { + public static function providerTestBuildFormWithTriggeringElement() { $plain_text = 'Other submit value'; $markup = 'Other submit <input> value'; return [ @@ -649,7 +649,7 @@ class FormBuilderTest extends FormTestBase { * * @return array */ - public function providerTestChildAccessInheritance() { + public static function providerTestChildAccessInheritance() { $data = []; $element = [ @@ -789,7 +789,7 @@ class FormBuilderTest extends FormTestBase { $this->assertSame($expected, $is_safe); } - public function providerTestValueCallableIsSafe() { + public static function providerTestValueCallableIsSafe() { $data = []; $data['string_no_slash'] = [ 'Drupal\Core\Render\Element\Token::valueCallback', @@ -866,7 +866,7 @@ class FormBuilderTest extends FormTestBase { } } - public function providerTestInvalidToken() { + public static function providerTestInvalidToken() { $data = []; $data['authenticated_invalid'] = [TRUE, FALSE, TRUE]; $data['authenticated_valid'] = [FALSE, TRUE, TRUE]; @@ -926,7 +926,7 @@ class FormBuilderTest extends FormTestBase { * * @return array */ - public function providerTestFormTokenCacheability() { + public static function providerTestFormTokenCacheability() { return [ 'token:none,authenticated:true' => [NULL, TRUE, ['contexts' => ['user.roles:authenticated']], ['max-age' => 0], 'post'], 'token:none,authenticated:false' => [NULL, FALSE, ['contexts' => ['user.roles:authenticated']], NULL, 'post'], diff --git a/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php b/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php index 03f09b90411..7eedb6d440b 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php @@ -31,7 +31,7 @@ class FormElementHelperTest extends UnitTestCase { /** * Provides test data. */ - public function getElementByNameProvider() { + public static function getElementByNameProvider() { $data = []; $data[] = ['id', [], []]; $data[] = [ @@ -117,7 +117,7 @@ class FormElementHelperTest extends UnitTestCase { /** * Provides test data. */ - public function getElementTitleProvider() { + public static function getElementTitleProvider() { $data = []; $data[] = ['id', [], '']; $data[] = [ diff --git a/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php b/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php index c29ebef96e8..e39c3973a32 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormHelperTest.php @@ -99,7 +99,7 @@ class FormHelperTest extends UnitTestCase { /** * Provides a list of elements to test. */ - public function providerElements() { + public static function providerElements() { return [ [ [ diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php index b81d1ea6b4b..6c877b5406d 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @@ -48,7 +48,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to test methods that take a single boolean argument. */ - public function providerSingleBooleanArgument() { + public static function providerSingleBooleanArgument() { return [ [TRUE], [FALSE], @@ -283,7 +283,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testGetLimitValidationErrors() and self::testGetLimitValidationErrors(). */ - public function providerLimitValidationErrors() { + public static function providerLimitValidationErrors() { return [ [NULL], [ @@ -322,7 +322,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testIsMethodType(). */ - public function providerIsMethodType() { + public static function providerIsMethodType() { return [ [TRUE, 'GET'], [TRUE, 'POST'], @@ -346,7 +346,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testSetMethod(). */ - public function providerSetRequestMethod() { + public static function providerSetRequestMethod() { return [ ['GET'], ['POST'], @@ -662,7 +662,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testSetTemporaryValue(). */ - public function providerSetTemporaryValue() { + public static function providerSetTemporaryValue() { return [ ['FOO', 'BAR'], ['FOO', NULL], @@ -700,7 +700,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testGetTemporaryValue(). */ - public function providerGetTemporaryValue() { + public static function providerGetTemporaryValue() { return [ [TRUE, 'FOO', 'BAR'], [TRUE, 'FOO', NULL], @@ -732,7 +732,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testHasTemporaryValue(). */ - public function providerHasTemporaryValue() { + public static function providerHasTemporaryValue() { return [ [TRUE, 'FOO'], [FALSE, 'FOO'], @@ -866,7 +866,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testLoadInclude(). */ - public function providerLoadInclude() { + public static function providerLoadInclude() { return [ // Existing files. [__FILE__, 'foo', 'inc', 'foo'], @@ -1298,7 +1298,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * Provides data to self::testGetRedirect(). */ - public function providerGetRedirect() { + public static function providerGetRedirect() { return [ [NULL], [FALSE], diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php index f8fb239b12e..3aadbc411d4 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php @@ -37,7 +37,7 @@ class FormStateTest extends UnitTestCase { * @return array * Returns some test data. */ - public function providerTestGetRedirect() { + public static function providerTestGetRedirect() { $data = []; $data[] = [[], NULL]; @@ -80,7 +80,7 @@ class FormStateTest extends UnitTestCase { $this->assertSame($error, $form_state->getError($element)); } - public function providerTestGetError() { + public static function providerTestGetError() { return [ [[], ['foo']], [['foo][bar' => 'Fail'], []], @@ -113,7 +113,7 @@ class FormStateTest extends UnitTestCase { $this->assertSame($expected_errors, $form_state->getErrors()); } - public function providerTestSetErrorByName() { + public static function providerTestSetErrorByName() { return [ // Only validate the 'options' element. [[['options']], ['options' => '']], @@ -264,7 +264,7 @@ class FormStateTest extends UnitTestCase { /** * Provides test data for testIsCached(). */ - public function providerTestIsCached() { + public static function providerTestIsCached() { $data = []; $data[] = [ TRUE, @@ -335,7 +335,7 @@ class FormStateTest extends UnitTestCase { /** * Provides test data for testIsMethodType(). */ - public function providerTestIsMethodType() { + public static function providerTestIsMethodType() { $data = []; $data[] = [ 'get', diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php index 38995566938..1b931f3027d 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateValuesTraitTest.php @@ -62,7 +62,7 @@ class FormStateValuesTraitTest extends UnitTestCase { * - The expected value (mixed). * - The default value (mixed). */ - public function providerGetValue() { + public static function providerGetValue() { $data = []; $data[] = [ 'foo', 'one', @@ -130,7 +130,7 @@ class FormStateValuesTraitTest extends UnitTestCase { * - The new value to set (mixed). * - The expected form state values after setting the new value (mixed[]). */ - public function providerSetValue() { + public static function providerSetValue() { $data = []; $data[] = [ 'foo', 'one', ['bar' => 'wrong', 'foo' => 'one'], @@ -170,7 +170,7 @@ class FormStateValuesTraitTest extends UnitTestCase { * - The key to check for in the form state (string) * - Whether the form state has an item with that key (bool). */ - public function providerHasValue() { + public static function providerHasValue() { $data = []; $data[] = [ 'foo', TRUE, @@ -219,7 +219,7 @@ class FormStateValuesTraitTest extends UnitTestCase { * - The key to check for in the form state (string) * - Whether the value is empty or not (bool). */ - public function providerIsValueEmpty() { + public static function providerIsValueEmpty() { $data = []; $data[] = [ 'foo', FALSE, diff --git a/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php b/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php index e5fa53b2d34..83dbfec7378 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php @@ -105,7 +105,7 @@ class FormSubmitterTest extends UnitTestCase { $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $return); } - public function providerTestHandleFormSubmissionWithResponses() { + public static function providerTestHandleFormSubmissionWithResponses() { return [ ['Symfony\Component\HttpFoundation\Response', 'response'], ['Symfony\Component\HttpFoundation\RedirectResponse', 'redirect'], @@ -178,7 +178,7 @@ class FormSubmitterTest extends UnitTestCase { * @return array * Returns some test data. */ - public function providerTestRedirectWithUrl() { + public static function providerTestRedirectWithUrl() { return [ [new Url('test_route_a', [], ['absolute' => TRUE]), 'test-route'], [new Url('test_route_b', ['key' => 'value'], ['absolute' => TRUE]), 'test-route/value'], diff --git a/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php b/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php index db334a0feef..ae523863d10 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php @@ -183,7 +183,7 @@ class FormValidatorTest extends UnitTestCase { $this->assertSame($expected, $form_state->getValues()); } - public function providerTestHandleErrorsWithLimitedValidation() { + public static function providerTestHandleErrorsWithLimitedValidation() { return [ // Test with a non-existent section. [ @@ -319,7 +319,7 @@ class FormValidatorTest extends UnitTestCase { $form_validator->validateForm('test_form_id', $form, $form_state); } - public function providerTestRequiredErrorMessage() { + public static function providerTestRequiredErrorMessage() { return [ [ // Use the default message with a title. diff --git a/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php b/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php index dcd20b47b36..25f6bf5668a 100644 --- a/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php +++ b/core/tests/Drupal/Tests/Core/Form/OptGroupTest.php @@ -27,7 +27,7 @@ class OptGroupTest extends UnitTestCase { * * @return array */ - public function providerTestFlattenOptions() { + public static function providerTestFlattenOptions() { $object1 = new \stdClass(); $object1->option = ['foo' => 'foo']; $object2 = new \stdClass(); diff --git a/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php b/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php index 1f6d3df502f..016fa6a1971 100644 --- a/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php +++ b/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php @@ -152,7 +152,7 @@ class SubformStateTest extends UnitTestCase { /** * Provides data to self::testGetValue(). */ - public function providerTestGetValue() { + public static function providerTestGetValue() { $data = []; $data['exist'] = [ ['dog'], @@ -176,7 +176,7 @@ class SubformStateTest extends UnitTestCase { /** * Provides data to self::testGetValueBroken(). */ - public function providerTestGetValueBroken() { + public static function providerTestGetValueBroken() { $data = []; $data['nested'] = [ ['dog', 'name'], @@ -205,7 +205,7 @@ class SubformStateTest extends UnitTestCase { /** * Provides data to self::testSetValues(). */ - public function providerTestSetValues() { + public static function providerTestSetValues() { $data = []; $data['exist'] = [ ['dog'], diff --git a/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php b/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php index 7dbd3f9fb40..edd771a7408 100644 --- a/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php +++ b/core/tests/Drupal/Tests/Core/Http/CacheableExceptionTest.php @@ -59,7 +59,7 @@ class CacheableExceptionTest extends UnitTestCase { $this->assertSame(123, $exception->getCode()); } - public function providerTestExceptions() { + public static function providerTestExceptions() { return [ [400, CacheableBadRequestHttpException::class], [401, CacheableUnauthorizedHttpException::class, 'test challenge', ['WWW-Authenticate' => 'test challenge']], diff --git a/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php b/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php index 94a35cecbaa..d880ee1d645 100644 --- a/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php @@ -64,7 +64,7 @@ class ClientFactoryTest extends UnitTestCase { * * @return array */ - public function providerTestCreateFromOptions() { + public static function providerTestCreateFromOptions() { return [ [[], [], ['verify' => TRUE, 'timeout' => 30]], [['timeout' => 40], [], ['verify' => TRUE, 'timeout' => 40]], diff --git a/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php b/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php index b9895ee4e8f..57530376ee2 100644 --- a/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Http/TrustedHostsRequestFactoryTest.php @@ -46,7 +46,7 @@ class TrustedHostsRequestFactoryTest extends UnitTestCase { * TrustedHostsRequestFactory::createRequest(). * - A string containing the expected host of the created request. */ - public function providerTestCreateRequest() { + public static function providerTestCreateRequest() { $tests = []; $tests[] = ['example.com', [], 'example.com']; $tests[] = ['localhost', [], 'localhost']; diff --git a/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php b/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php index 67e16ab64ec..e347ed5fe25 100644 --- a/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php @@ -105,7 +105,7 @@ class LanguageUnitTest extends UnitTestCase { * @return array * An array of test data. */ - public function providerTestSortArrayOfLanguages() { + public static function providerTestSortArrayOfLanguages() { $language9A = new Language(['id' => 'dd', 'name' => 'A', 'weight' => 9]); $language10A = new Language(['id' => 'ee', 'name' => 'A', 'weight' => 10]); $language10B = new Language(['id' => 'ff', 'name' => 'B', 'weight' => 10]); diff --git a/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php b/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php index 142b31a3d76..9bb982c9f12 100644 --- a/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Layout/LayoutDefaultTest.php @@ -52,7 +52,7 @@ class LayoutDefaultTest extends UnitTestCase { /** * Provides test data for ::testBuild(). */ - public function providerTestBuild() { + public static function providerTestBuild() { $data = []; // Empty regions are not added. $data['right_only'] = [ diff --git a/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php b/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php index 537d727fb6c..5e88cd9be7c 100644 --- a/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php +++ b/core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php @@ -39,7 +39,7 @@ class LogMessageParserTest extends UnitTestCase { /** * Data provider for testParseMessagePlaceholders(). */ - public function providerTestParseMessagePlaceholders() { + public static function providerTestParseMessagePlaceholders() { return [ 'PSR3-style placeholder' => [ ['message' => 'User {username} created', 'context' => ['username' => 'Dries']], diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php index 7d966e36aaa..223fb5a6d6c 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php @@ -190,7 +190,7 @@ class LocalTaskDefaultTest extends UnitTestCase { * @return array * A list or test plugin definition and expected weight. */ - public function providerTestGetWeight() { + public static function providerTestGetWeight() { return [ // Manually specify a weight, so this is used. [['weight' => 314], 'test_id', 314], diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php index 8b87382fb92..df19630a04d 100644 --- a/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php @@ -19,7 +19,7 @@ class MenuTreeParametersTest extends UnitTestCase { /** * Provides test data for testSetMinDepth(). */ - public function providerTestSetMinDepth() { + public static function providerTestSetMinDepth() { $data = []; // Valid values at the extremes and in the middle. diff --git a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php index 39983742006..bd6944b62e3 100644 --- a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php @@ -47,7 +47,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase { /** * Provides test data for testLoadOverride. */ - public function providerTestLoadOverride() { + public static function providerTestLoadOverride() { $data = []; // Valid ID. $data[] = [['test1' => ['parent' => 'test0']], 'test1', ['parent' => 'test0']]; @@ -181,7 +181,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase { /** * Provides test data for testDeleteOverrides. */ - public function providerTestDeleteOverrides() { + public static function providerTestDeleteOverrides() { $data = []; // Delete a non existing ID. $data[] = ['test0', [], []]; diff --git a/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php b/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php index cf612b8f377..227cfc83533 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php @@ -92,7 +92,7 @@ class ChainRequestPolicyTest extends UnitTestCase { * @return array * Test input and expected result. */ - public function providerChainExceptionOnInvalidReturnValue() { + public static function providerChainExceptionOnInvalidReturnValue() { return [ [FALSE], [0], @@ -130,7 +130,7 @@ class ChainRequestPolicyTest extends UnitTestCase { * @return array * Test input and expected result. */ - public function providerAllowIfAnyRuleReturnedAllow() { + public static function providerAllowIfAnyRuleReturnedAllow() { return [ [[RequestPolicyInterface::ALLOW]], [[NULL, RequestPolicyInterface::ALLOW]], diff --git a/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php b/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php index 5daf21b7743..377d5a16d5f 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php @@ -101,7 +101,7 @@ class ChainResponsePolicyTest extends UnitTestCase { * @return array * Test input and expected result. */ - public function providerChainExceptionOnInvalidReturnValue() { + public static function providerChainExceptionOnInvalidReturnValue() { return [ [FALSE], [0], diff --git a/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php b/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php index fab3ccd2996..99eb53cd733 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php @@ -56,7 +56,7 @@ class CommandLineOrUnsafeMethodTest extends UnitTestCase { * @return array * Test data and expected results. */ - public function providerTestHttpMethod() { + public static function providerTestHttpMethod() { return [ [NULL, 'GET'], [NULL, 'HEAD'], diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php index b595fdb74a3..3490bd362f0 100644 --- a/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php +++ b/core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php @@ -169,7 +169,7 @@ class EntityConverterTest extends UnitTestCase { /** * Provides test data for testApplies() */ - public function providerTestApplies() { + public static function providerTestApplies() { $data = []; $data[] = [['type' => 'entity:foo'], 'foo', new Route('/test/{foo}/bar'), FALSE]; $data[] = [['type' => 'entity:entity_test'], 'foo', new Route('/test/{foo}/bar'), TRUE]; @@ -203,7 +203,7 @@ class EntityConverterTest extends UnitTestCase { /** * Provides test data for testConvert. */ - public function providerTestConvert() { + public static function providerTestConvert() { $data = []; // Existing entity type. $data[] = ['valid_id', ['type' => 'entity:entity_test'], ['foo' => 'valid_id'], (object) ['id' => 'valid_id']]; diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php index 2592562b9e2..330ab0ff0f3 100644 --- a/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php +++ b/core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php @@ -88,7 +88,7 @@ class EntityRevisionParamConverterTest extends UnitTestCase { /** * Provides test data for testConvert. */ - public function providerTestConvert() { + public static function providerTestConvert() { $data = []; // Existing entity type. $data[] = ['valid_id', ['type' => 'entity_revision:entity_test'], ['test_revision' => 'valid_id'], (object) ['revision_id' => 'valid_id']]; diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php index 017c50179c9..e518f99e6ef 100644 --- a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php +++ b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php @@ -112,7 +112,7 @@ class ParamConverterManagerTest extends UnitTestCase { * * @see ParamConverterManagerTest::testGetConverter() */ - public function providerTestGetConverter() { + public static function providerTestGetConverter() { return [ ['ape', 'ApeConverterClass'], ['cat', 'CatConverterClass'], @@ -159,7 +159,7 @@ class ParamConverterManagerTest extends UnitTestCase { /** * Provides data for testSetRouteParameterConverters(). */ - public function providerTestSetRouteParameterConverters() { + public static function providerTestSetRouteParameterConverters() { return [ ['/test'], ['/test/{id}', ['id' => []], 'applied'], diff --git a/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php b/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php index 646df509163..ec62177e967 100644 --- a/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php +++ b/core/tests/Drupal/Tests/Core/Password/PhpPasswordTest.php @@ -106,7 +106,7 @@ class PhpPasswordTest extends UnitTestCase { /** * Provides the test matrix for testLongPassword(). */ - public function providerLongPasswords() { + public static function providerLongPasswords() { // '512 byte long password is allowed.' $passwords['allowed'] = [str_repeat('x', PasswordInterface::PASSWORD_MAX_LENGTH), TRUE]; // 513 byte long password is not allowed. diff --git a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php index d733204fa14..1213e9e3509 100644 --- a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php +++ b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php @@ -57,7 +57,7 @@ class PathMatcherTest extends UnitTestCase { * @return array * A nested array of pattern arrays and path arrays. */ - public function getMatchPathData() { + public static function getMatchPathData() { return [ [ // Single absolute paths. diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php index 782fe3b55c9..9cdd35e54e9 100644 --- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php +++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php @@ -41,7 +41,7 @@ class PathProcessorFrontTest extends UnitTestCase { /** * Inbound paths and expected results. */ - public function providerProcessInbound() { + public static function providerProcessInbound() { return [ 'accessing frontpage' => ['/node', '/', '/node'], 'accessing non frontpage' => ['/node', '/user', '/user'], diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php index 66266bd616c..1fd6da4f1ac 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionIsSatisfiedTest.php @@ -82,7 +82,7 @@ class ContextDefinitionIsSatisfiedTest extends UnitTestCase { /** * Provides test data for ::testIsSatisfiedBy(). */ - public function providerTestIsSatisfiedBy() { + public static function providerTestIsSatisfiedBy() { $data = []; // Simple data types. diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php index 6a54511a545..0ddf0a4178e 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextDefinitionTest.php @@ -21,7 +21,7 @@ class ContextDefinitionTest extends UnitTestCase { /** * Very simple data provider. */ - public function providerGetDataDefinition() { + public static function providerGetDataDefinition() { return [ [TRUE], [FALSE], @@ -163,7 +163,7 @@ class ContextDefinitionTest extends UnitTestCase { /** * Data provider for testGetConstraint. */ - public function providerGetConstraint() { + public static function providerGetConstraint() { return [ [NULL, [], 'nonexistent_constraint_name'], [ diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php index 58cc1e1102a..5e9c909e4a3 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionIsSatisfiedTest.php @@ -244,7 +244,7 @@ class EntityContextDefinitionIsSatisfiedTest extends UnitTestCase { /** * Provides test data for ::testIsSatisfiedByGenerateBundledEntity(). */ - public function providerTestIsSatisfiedByGenerateBundledEntity() { + public static function providerTestIsSatisfiedByGenerateBundledEntity() { $data = []; $data['no requirement'] = [ TRUE, @@ -322,7 +322,7 @@ class EntityContextDefinitionIsSatisfiedTest extends UnitTestCase { /** * Provides test data for ::testIsSatisfiedByPassBundledEntity(). */ - public function providerTestIsSatisfiedByPassBundledEntity() { + public static function providerTestIsSatisfiedByPassBundledEntity() { $data = []; $data[] = [TRUE, []]; $data[] = [FALSE, ['first_bundle']]; diff --git a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php index c3a655eb383..925badd54fa 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php @@ -201,7 +201,7 @@ class ContextHandlerTest extends UnitTestCase { /** * Provides data for testFilterPluginDefinitionsByContexts(). */ - public function providerTestFilterPluginDefinitionsByContexts() { + public static function providerTestFilterPluginDefinitionsByContexts() { $data = []; $plugins = []; diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php index 5f78e8ac893..70b62410e80 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php @@ -64,7 +64,7 @@ class DefaultLazyPluginCollectionTest extends LazyPluginCollectionTestBase { * @return array * The test data. */ - public function providerTestSortHelper() { + public static function providerTestSortHelper() { return [ ['apple', 'apple', 0], ['apple', 'cherry', -1], diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php index 196598b40f1..2f865f65a86 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php @@ -414,7 +414,7 @@ class DefaultPluginManagerTest extends UnitTestCase { $this->assertEquals($expected, $definition); } - public function providerTestProcessDefinition() { + public static function providerTestProcessDefinition() { $data = []; $data['merge'][] = [ diff --git a/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php index e0a5f141ffb..15896ffb7ca 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php @@ -56,7 +56,7 @@ class FilteredPluginManagerTraitTest extends UnitTestCase { /** * Provides test data for ::testGetFilteredDefinitions(). */ - public function providerTestGetFilteredDefinitions() { + public static function providerTestGetFilteredDefinitions() { $data = []; $data['populated context'] = [ ['context1' => 'fake context'], diff --git a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php index 4c1b10ebf61..46ede2cb185 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/PluginWithFormsTraitTest.php @@ -30,7 +30,7 @@ class PluginWithFormsTraitTest extends UnitTestCase { /** * @return array */ - public function providerGetFormClass() { + public static function providerGetFormClass() { $block_plugin_without_forms = new TestClass([], 'block_plugin_without_forms', [ 'provider' => 'block_test', ]); diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php index c0502152bea..5895cf5ef39 100644 --- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php @@ -67,7 +67,7 @@ class BubbleableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestMerge() { + public static function providerTestMerge() { return [ // Second operand is a BubbleableMetadata object. // All empty. @@ -118,7 +118,7 @@ class BubbleableMetadataTest extends UnitTestCase { /** * Provides test data for testAddAttachments(). */ - public function providerTestAddAttachments() { + public static function providerTestAddAttachments() { return [ [new BubbleableMetadata(), [], new BubbleableMetadata()], [new BubbleableMetadata(), ['library' => ['core/foo']], (new BubbleableMetadata())->setAttachments(['library' => ['core/foo']])], @@ -140,7 +140,7 @@ class BubbleableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestApplyTo() { + public static function providerTestApplyTo() { $data = []; $empty_metadata = new BubbleableMetadata(); @@ -204,7 +204,7 @@ class BubbleableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestCreateFromRenderArray() { + public static function providerTestCreateFromRenderArray() { $data = []; $empty_metadata = new BubbleableMetadata(); @@ -398,7 +398,7 @@ class BubbleableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestMergeAttachmentsHtmlHeadMerging() { + public static function providerTestMergeAttachmentsHtmlHeadMerging() { $meta = [ '#tag' => 'meta', '#attributes' => [ @@ -471,7 +471,7 @@ class BubbleableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestMergeAttachmentsHtmlHeadLinkMerging() { + public static function providerTestMergeAttachmentsHtmlHeadLinkMerging() { $rel = [ 'rel' => 'rel', 'href' => 'http://rel.example.com', @@ -537,7 +537,7 @@ class BubbleableMetadataTest extends UnitTestCase { * * @return array */ - public function providerTestMergeAttachmentsHttpHeaderMerging() { + public static function providerTestMergeAttachmentsHttpHeaderMerging() { $content_type = [ 'Content-Type', 'application/rss+xml; charset=utf-8', diff --git a/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php b/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php index e0f5bceb13f..104f0fec140 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/HtmlTagTest.php @@ -42,7 +42,7 @@ class HtmlTagTest extends RendererTestBase { /** * Data provider for preRenderHtmlTag test. */ - public function providerPreRenderHtmlTag() { + public static function providerPreRenderHtmlTag() { $tags = []; // Value prefix/suffix. diff --git a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php index c6ccbc3f3aa..1361a55ee1d 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php @@ -34,7 +34,7 @@ class MachineNameTest extends UnitTestCase { /** * Data provider for testValueCallback(). */ - public function providerTestValueCallback() { + public static function providerTestValueCallback() { $data = []; $data[] = [NULL, FALSE]; $data[] = [NULL, NULL]; diff --git a/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php b/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php index 655f8da70ea..1862a3a343e 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/PasswordConfirmTest.php @@ -27,7 +27,7 @@ class PasswordConfirmTest extends UnitTestCase { /** * Data provider for testValueCallback(). */ - public function providerTestValueCallback() { + public static function providerTestValueCallback() { $data = []; $data[] = [['pass1' => '', 'pass2' => ''], [], NULL]; $data[] = [['pass1' => '', 'pass2' => ''], ['#default_value' => ['pass2' => 'value']], NULL]; diff --git a/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php b/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php index 35dcea028db..9085722c3ec 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/PasswordTest.php @@ -28,7 +28,7 @@ class PasswordTest extends UnitTestCase { /** * Data provider for testValueCallback(). */ - public function providerTestValueCallback() { + public static function providerTestValueCallback() { $data = []; $data[] = [NULL, FALSE]; $data[] = [NULL, NULL]; diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php index 3218c61d6d9..e66a2819a40 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php @@ -28,7 +28,7 @@ class TextareaTest extends UnitTestCase { /** * Data provider for testValueCallback(). */ - public function providerTestValueCallback() { + public static function providerTestValueCallback() { $data = []; $data[] = [NULL, FALSE]; $data[] = [NULL, NULL]; diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php index 640bff423ed..5ec874b2d92 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/TextfieldTest.php @@ -28,7 +28,7 @@ class TextfieldTest extends UnitTestCase { /** * Data provider for testValueCallback(). */ - public function providerTestValueCallback() { + public static function providerTestValueCallback() { $data = []; $data[] = [NULL, FALSE]; $data[] = [NULL, NULL]; diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php index 1efeb73a88f..40f1bea21ab 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/TokenTest.php @@ -28,7 +28,7 @@ class TokenTest extends UnitTestCase { /** * Data provider for testValueCallback(). */ - public function providerTestValueCallback() { + public static function providerTestValueCallback() { $data = []; $data[] = [NULL, FALSE]; $data[] = [NULL, NULL]; diff --git a/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php b/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php index d9a970c7c94..aae2733dbe2 100644 --- a/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Render/ElementInfoManagerTest.php @@ -114,7 +114,7 @@ class ElementInfoManagerTest extends UnitTestCase { * * @return array */ - public function providerTestGetInfoElementPlugin() { + public static function providerTestGetInfoElementPlugin() { $data = []; $data[] = [ 'Drupal\Core\Render\Element\ElementInterface', diff --git a/core/tests/Drupal/Tests/Core/Render/ElementTest.php b/core/tests/Drupal/Tests/Core/Render/ElementTest.php index 39e0aae6aec..31f3a7b8a2c 100644 --- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php +++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php @@ -142,7 +142,7 @@ class ElementTest extends UnitTestCase { * * @return array */ - public function providerVisibleChildren() { + public static function providerVisibleChildren() { return [ [['#property1' => '', '#property2' => []], []], [['#property1' => '', 'child1' => []], ['child1']], @@ -169,7 +169,7 @@ class ElementTest extends UnitTestCase { /** * Data provider for testSetAttributes(). */ - public function providerTestSetAttributes() { + public static function providerTestSetAttributes() { $base = ['#id' => 'id', '#class' => []]; return [ [$base, [], $base], @@ -187,7 +187,7 @@ class ElementTest extends UnitTestCase { $this->assertSame(Element::isEmpty($element), $expected); } - public function providerTestIsEmpty() { + public static function providerTestIsEmpty() { return [ [[], TRUE], [['#attached' => []], FALSE], diff --git a/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php index 2b1e75f32fd..2c54d6146bc 100644 --- a/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Render/MetadataBubblingUrlGeneratorTest.php @@ -69,7 +69,7 @@ class MetadataBubblingUrlGeneratorTest extends UrlGeneratorTest { /** * Data provider for ::testUrlBubbleableMetadataBubbling(). */ - public function providerUrlBubbleableMetadataBubbling() { + public static function providerUrlBubbleableMetadataBubbling() { return [ // No bubbling when bubbleable metadata is collected. [TRUE, 0, []], diff --git a/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php b/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php index c248c9f78fa..e803b199d16 100644 --- a/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php @@ -85,7 +85,7 @@ class PlaceholderGeneratorTest extends RendererTestBase { /** * @return array */ - public function providerCreatePlaceholderGeneratesValidHtmlMarkup() { + public static function providerCreatePlaceholderGeneratesValidHtmlMarkup() { return [ 'multiple-arguments' => [['#lazy_builder' => ['Drupal\Tests\Core\Render\PlaceholdersTest::callback', ['foo', 'bar']]]], 'special-character-&' => [['#lazy_builder' => ['Drupal\Tests\Core\Render\PlaceholdersTest::callback', ['foo&bar']]]], diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php index fb6a43c9fb0..514f7fe4a76 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php @@ -146,7 +146,7 @@ class RendererBubblingTest extends RendererTestBase { $this->assertRenderCacheItem($element['#cache']['keys'], $expected_cache_item); } - public function providerTestContextBubblingEdgeCases() { + public static function providerTestContextBubblingEdgeCases() { $data = []; // Cache contexts of inaccessible children aren't bubbled (because those @@ -498,7 +498,7 @@ class RendererBubblingTest extends RendererTestBase { * * @return array */ - public function providerTestBubblingWithPrerender() { + public static function providerTestBubblingWithPrerender() { $data = []; // Test element without theme. diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php index 5096ba4b42e..de0897251cf 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php @@ -666,7 +666,7 @@ class RendererTest extends RendererTestBase { * * @return array */ - public function providerRenderTwice() { + public static function providerRenderTwice() { return [ [ [ @@ -720,7 +720,7 @@ class RendererTest extends RendererTestBase { * * @return array */ - public function providerAccessValues() { + public static function providerAccessValues() { return [ [FALSE], [TRUE], @@ -795,7 +795,7 @@ class RendererTest extends RendererTestBase { * * @return array */ - public function providerRenderCache() { + public static function providerRenderCache() { return [ 'full access' => [ NULL, @@ -903,7 +903,7 @@ class RendererTest extends RendererTestBase { } } - public function providerTestRenderCacheMaxAge() { + public static function providerTestRenderCacheMaxAge() { return [ [0, FALSE, NULL], [60, TRUE, (int) $_SERVER['REQUEST_TIME'] + 60], @@ -973,7 +973,7 @@ class RendererTest extends RendererTestBase { * An array of associative arrays of expected results keyed by property * name. */ - public function providerTestRenderCacheProperties() { + public static function providerTestRenderCacheProperties() { return [ [[]], [['child1' => 0, 'child2' => 0, '#custom_property' => 0, '#custom_property_array' => 0]], @@ -998,7 +998,7 @@ class RendererTest extends RendererTestBase { $this->assertEquals($build, $expected); } - public function providerTestAddCacheableDependency() { + public static function providerTestAddCacheableDependency() { return [ // Empty render array, typical default cacheability. [ diff --git a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php index cd30ec3e164..647a1819ef0 100644 --- a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php @@ -87,7 +87,7 @@ class RoleAccessCheckTest extends UnitTestCase { * * @see \Drupal\Tests\Core\Route\RouterRoleTest::testRoleAccess */ - public function roleAccessProvider() { + public static function roleAccessProvider() { // Setup two different roles used in the test. $rid_1 = 'role_test_1'; $rid_2 = 'role_test_2'; diff --git a/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php b/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php index d05e0fe6744..3b62244155c 100644 --- a/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php @@ -45,7 +45,7 @@ class AcceptHeaderMatcherTest extends UnitTestCase { * * @see Drupal\Tests\Core\Routing\AcceptHeaderMatcherTest::testAcceptFiltering() */ - public function acceptFilterProvider() { + public static function acceptFilterProvider() { return [ // Check that JSON routes get filtered and prioritized correctly. ['application/json, text/xml;q=0.9', 'json', 'route_c', 'route_e'], diff --git a/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php b/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php index da8facef8dd..e3b44e12318 100644 --- a/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/ContentTypeHeaderMatcherTest.php @@ -57,7 +57,7 @@ class ContentTypeHeaderMatcherTest extends UnitTestCase { $this->assertCount(7, $routes, 'The correct number of routes was found.'); } - public function providerTestSafeRequestFilter() { + public static function providerTestSafeRequestFilter() { return [ ['GET'], ['HEAD'], diff --git a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php index a41e39ef61f..2bf84130126 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php @@ -96,7 +96,7 @@ class RedirectDestinationTest extends UnitTestCase { $this->assertEquals(['destination' => $expected_destination], $this->redirectDestination->getAsArray()); } - public function providerGet() { + public static function providerGet() { $data = []; $request = Request::create('/'); diff --git a/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php b/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php index e6ba2b480a7..af9c6199a8c 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php @@ -35,7 +35,7 @@ class RequestFormatRouteFilterTest extends UnitTestCase { $this->assertSame($expected_filtered_collection, array_keys($collection->all())); } - public function filterProvider() { + public static function filterProvider() { $route_without_format = new Route('/test'); $route_with_format = new Route('/test'); $route_with_format->setRequirement('_format', 'json'); diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php index 304c1c61cc0..9c282fac1ff 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php @@ -39,7 +39,7 @@ class RouteCompilerTest extends UnitTestCase { * be calculated as the first value and the expected fit as the second * value. */ - public function providerTestGetFit() { + public static function providerTestGetFit() { return [ ['test', 1], ['/estWithLeadingSlash', 1], diff --git a/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php b/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php index 53f977d427c..440904c014b 100644 --- a/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php @@ -75,7 +75,7 @@ class TrustedRedirectResponseTest extends UnitTestCase { /** * @return array */ - public function providerCreateFromRedirectResponse() { + public static function providerCreateFromRedirectResponse() { return [ 'cacheable-with-tags' => [(new CacheableRedirectResponse('/example'))->addCacheableDependency((new CacheableMetadata())->addCacheTags(['foo']))], 'cacheable-with-max-age-0' => [(new CacheableRedirectResponse('/example'))->addCacheableDependency((new CacheableMetadata())->setCacheMaxAge(0))], diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php index 5d3dc75ad19..a576be6eb30 100644 --- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php @@ -360,7 +360,7 @@ class UrlGeneratorTest extends UnitTestCase { /** * Provides test data for testAliasGenerationWithOptions. */ - public function providerTestAliasGenerationWithOptions() { + public static function providerTestAliasGenerationWithOptions() { $data = []; // Extra parameters should appear in the query string. $data[] = [ @@ -517,7 +517,7 @@ class UrlGeneratorTest extends UnitTestCase { /** * Data provider for ::testNoPath(). */ - public function providerTestNoPath() { + public static function providerTestNoPath() { return [ // Empty options. [[], ''], diff --git a/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php b/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php index f16ad55421a..a97a5b6ab68 100644 --- a/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php @@ -29,7 +29,7 @@ class DoTrustedCallbackTraitTest extends UnitTestCase { /** * Data provider for ::testTrustedCallbacks(). */ - public function providerTestTrustedCallbacks() { + public static function providerTestTrustedCallbacks() { $closure = function () { return 'test'; }; @@ -58,7 +58,7 @@ class DoTrustedCallbackTraitTest extends UnitTestCase { /** * Data provider for ::testUntrustedCallbacks(). */ - public function providerTestUntrustedCallbacks() { + public static function providerTestUntrustedCallbacks() { $tests['TrustedCallbackInterface_object'] = [[new TrustedMethods(), 'unTrustedCallback'], TrustedInterface::class]; $tests['TrustedCallbackInterface_static_string'] = ['\Drupal\Tests\Core\Security\TrustedMethods::unTrustedCallback', TrustedInterface::class]; $tests['TrustedCallbackInterface_static_array'] = [[TrustedMethods::class, 'unTrustedCallback'], TrustedInterface::class]; @@ -99,7 +99,7 @@ class DoTrustedCallbackTraitTest extends UnitTestCase { /** * Data provider for tests of ::doTrustedCallback $error_type argument. */ - public function errorTypeProvider() { + public static function errorTypeProvider() { $tests['untrusted_object'] = [[new UntrustedObject(), 'callback']]; $tests['untrusted_object_static_string'] = ['Drupal\Tests\Core\Security\UntrustedObject::callback']; $tests['untrusted_object_static_array'] = [[UntrustedObject::class, 'callback']]; diff --git a/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php b/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php index 1892b38e722..6e508a1ea62 100644 --- a/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php +++ b/core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php @@ -99,7 +99,7 @@ class RequestSanitizerTest extends UnitTestCase { * * @return array */ - public function providerTestRequestSanitization() { + public static function providerTestRequestSanitization() { $tests = []; $request = new Request(['q' => 'index.php']); @@ -314,7 +314,7 @@ class RequestSanitizerTest extends UnitTestCase { /** * Data provider for testing acceptable destinations. */ - public function providerTestAcceptableDestinations() { + public static function providerTestAcceptableDestinations() { $data = []; // Standard internal example node path is present in the 'destination' // parameter. @@ -331,7 +331,7 @@ class RequestSanitizerTest extends UnitTestCase { /** * Data provider for testing sanitized destinations. */ - public function providerTestSanitizedDestinations() { + public static function providerTestSanitizedDestinations() { $data = []; // External URL without scheme is not allowed. $data[] = ['//example.com/test']; diff --git a/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php b/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php index be29f17bea9..0e0113c5e50 100644 --- a/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php +++ b/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php @@ -220,7 +220,7 @@ class AccessPolicyProcessorTest extends UnitTestCase { * @return array * A list of testAccountSwitcher method arguments. */ - public function accountSwitcherProvider() { + public static function accountSwitcherProvider() { $cases['no-user-context-no-current-user'] = [ 'has_user_context' => FALSE, 'is_current_user' => FALSE, @@ -301,7 +301,7 @@ class AccessPolicyProcessorTest extends UnitTestCase { * @return array * A list of testAccountSwitcher method arguments. */ - public function cachingProvider() { + public static function cachingProvider() { $cases = [ 'no-cache' => [FALSE, FALSE], 'static-cache-hit' => [FALSE, TRUE], diff --git a/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php b/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php index 1e2433a4a80..2a2cbeee18b 100644 --- a/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php +++ b/core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php @@ -47,7 +47,7 @@ class SessionConfigurationTest extends UnitTestCase { * @return array * Test data */ - public function providerTestGeneratedCookieDomain() { + public static function providerTestGeneratedCookieDomain() { return [ ['http://example.com/path/index.php', '.example.com'], ['http://www.example.com/path/index.php', '.www.example.com'], @@ -86,7 +86,7 @@ class SessionConfigurationTest extends UnitTestCase { * @return array * Test data */ - public function providerTestEnforcedCookieDomain() { + public static function providerTestEnforcedCookieDomain() { return [ ['http://example.com/path/index.php', '.example.com'], ['http://www.example.com/path/index.php', '.example.com'], @@ -152,7 +152,7 @@ class SessionConfigurationTest extends UnitTestCase { * @return array * Test data */ - public function providerTestCookieSecure() { + public static function providerTestCookieSecure() { return [ ['http://example.com/path/index.php', FALSE], ['https://www.example.com/path/index.php', TRUE], @@ -185,7 +185,7 @@ class SessionConfigurationTest extends UnitTestCase { * @return array * Test data */ - public function providerTestGeneratedSessionName() { + public static function providerTestGeneratedSessionName() { $data = [ ['http://example.com/path/index.php', 'SESS', 'example.com'], ['http://www.example.com/path/index.php', 'SESS', 'www.example.com'], @@ -233,7 +233,7 @@ class SessionConfigurationTest extends UnitTestCase { * @return array * Test data */ - public function providerTestEnforcedSessionName() { + public static function providerTestEnforcedSessionName() { $data = [ ['http://example.com/path/index.php', 'SESS', '.example.com'], ['http://www.example.com/path/index.php', 'SESS', '.example.com'], @@ -279,7 +279,7 @@ class SessionConfigurationTest extends UnitTestCase { * @return array * Test data */ - public function providerTestConstructorDefaultSettings() { + public static function providerTestConstructorDefaultSettings() { return [ [[], 48, 6], [['sid_length' => 100], 100, 6], diff --git a/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php b/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php index fdf72aea108..b55cc05393a 100644 --- a/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php +++ b/core/tests/Drupal/Tests/Core/Session/UserSessionTest.php @@ -30,7 +30,7 @@ class UserSessionTest extends UnitTestCase { * * @return array */ - public function providerTestHasPermission() { + public static function providerTestHasPermission() { $data = []; $data[] = ['example permission', ['user_one', 'user_two'], ['user_last']]; $data[] = ['another example permission', ['user_two'], ['user_one', 'user_last']]; diff --git a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php index e44988f5f0c..0f2c7498d75 100644 --- a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php @@ -162,7 +162,7 @@ class WriteSafeSessionHandlerTest extends UnitTestCase { * @return array * Test data. */ - public function providerTestOtherMethods() { + public static function providerTestOtherMethods() { return [ ['open', TRUE, ['/some/path', 'some-session-id']], ['read', 'some-session-data', ['a-session-id']], diff --git a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php index 928a7768607..483c694fb4d 100644 --- a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php +++ b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php @@ -101,7 +101,7 @@ class SettingsTest extends UnitTestCase { * * @return array */ - public function providerTestGetHashSaltEmpty() { + public static function providerTestGetHashSaltEmpty() { return [ [[]], [['hash_salt' => '']], @@ -220,7 +220,7 @@ class SettingsTest extends UnitTestCase { * * @see self::providerTestRealDeprecatedSettings() */ - public function providerTestFakeDeprecatedSettings(): array { + public static function providerTestFakeDeprecatedSettings(): array { $only_legacy = [ 'deprecated_legacy' => 'old', @@ -306,7 +306,7 @@ class SettingsTest extends UnitTestCase { /** * Provides data for testRealDeprecatedSettings(). */ - public function providerTestRealDeprecatedSettings(): array { + public static function providerTestRealDeprecatedSettings(): array { return [ [ 'block_interest_cohort', @@ -368,7 +368,7 @@ class SettingsTest extends UnitTestCase { /** * Provides data for testDatabaseInfoInitialization(). */ - public function providerTestDatabaseInfoInitialization(): array { + public static function providerTestDatabaseInfoInitialization(): array { return [ ['mysql', NULL, NULL, 'Drupal\\mysql\\Driver\\Database\\mysql', 'core/modules/mysql/src/Driver/Database/mysql/'], ['mysql', '', NULL, 'Drupal\\mysql\\Driver\\Database\\mysql', 'core/modules/mysql/src/Driver/Database/mysql/'], diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php index 59212d73979..e406d11a02a 100644 --- a/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php +++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ContentLengthTest.php @@ -34,7 +34,7 @@ class ContentLengthTest extends UnitTestCase { $this->assertSame((string) $expected_header, $response->headers->get('Content-Length')); } - public function providerTestSetContentLengthHeader() { + public static function providerTestSetContentLengthHeader() { return [ 'Informational' => [ FALSE, diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php index 244d32d617d..dbc4e54de26 100644 --- a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php +++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php @@ -68,7 +68,7 @@ class ReverseProxyMiddlewareTest extends UnitTestCase { /** * Data provider for testReverseProxyEnabled. */ - public function reverseProxyEnabledProvider() { + public static function reverseProxyEnabledProvider() { return [ 'Proxy with default trusted headers' => [ ['reverse_proxy_addresses' => ['127.0.0.2', '127.0.0.3']], diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php index 64a54741ea9..a125ef27fb7 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php @@ -29,7 +29,7 @@ class ByteSizeMarkupTest extends UnitTestCase { /** * Provides a list of byte size to test. */ - public function providerTestCommonFormatSize() { + public static function providerTestCommonFormatSize() { $kb = Bytes::KILOBYTE; return [ ['0 bytes', 0], diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php index 738c85f9f1d..80ab6d3edae 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/PluralTranslatableMarkupTest.php @@ -36,7 +36,7 @@ class PluralTranslatableMarkupTest extends UnitTestCase { /** * Data provider for ::testPluralTranslatableMarkupSerialization(). */ - public function providerPluralTranslatableMarkupSerialization() { + public static function providerPluralTranslatableMarkupSerialization() { return [ [1, 'singular 1'], [2, 'plural 2'], diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php index 8e821c67ede..5d8f7ca9bc8 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php @@ -34,7 +34,7 @@ class TranslationManagerTest extends UnitTestCase { * Provides some test data for formatPlural() * @return array */ - public function providerTestFormatPlural() { + public static function providerTestFormatPlural() { return [ [1, 'Singular', '@count plural', [], [], 'Singular'], [2, 'Singular', '@count plural', [], [], '2 plural'], @@ -88,7 +88,7 @@ class TranslationManagerTest extends UnitTestCase { * * @return array */ - public function providerTestTranslatePlaceholder() { + public static function providerTestTranslatePlaceholder() { return [ ['foo @bar', ['@bar' => 'bar'], 'foo bar'], ['bar %baz', ['%baz' => 'baz'], 'bar <em class="placeholder">baz</em>'], diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php index c6b5ec39cd5..4590a145b44 100644 --- a/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Template/AttributeHelperTest.php @@ -21,7 +21,7 @@ class AttributeHelperTest extends UnitTestCase { * An array of test data each containing an array of attributes, the name * of the attribute to check existence of, and the expected result. */ - public function providerTestAttributeExists() { + public static function providerTestAttributeExists() { return [ [['class' => ['example-class']], 'class', TRUE], [[], 'class', FALSE], @@ -48,7 +48,7 @@ class AttributeHelperTest extends UnitTestCase { * An array of test data each containing an initial attribute collection, an * Attribute object or array to be merged, and the expected result. */ - public function providerTestMergeCollections() { + public static function providerTestMergeCollections() { return [ [[], ['class' => ['class1']], ['class' => ['class1']]], [[], new Attribute(['class' => ['class1']]), ['class' => ['class1']]], diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php index 6953c5bf25d..4b708c23948 100644 --- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php +++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php @@ -281,7 +281,7 @@ class AttributeTest extends UnitTestCase { * An array of test data each containing of a twig template string, * a resulting string of classes and an optional array of attributes. */ - public function providerTestAttributeClassHelpers() { + public static function providerTestAttributeClassHelpers() { // cSpell:disable return [ ["{{ attributes.class }}", ''], @@ -364,7 +364,7 @@ class AttributeTest extends UnitTestCase { $this->assertEquals($expected, (new Attribute($attributes))->__toString()); } - public function providerTestAttributeValues() { + public static function providerTestAttributeValues() { $data = []; $string = '"> <script>alert(123)</script>"'; @@ -471,7 +471,7 @@ class AttributeTest extends UnitTestCase { * An array of test data each containing an array of attributes, the name * of the attribute to check existence of, and the expected result. */ - public function providerTestHasAttribute() { + public static function providerTestHasAttribute() { return [ [['class' => ['example-class']], 'class', TRUE], [[], 'class', FALSE], @@ -497,7 +497,7 @@ class AttributeTest extends UnitTestCase { * An array of test data each containing an initial Attribute object, an * Attribute object or array to be merged, and the expected result. */ - public function providerTestMerge() { + public static function providerTestMerge() { return [ [new Attribute([]), new Attribute(['class' => ['class1']]), new Attribute(['class' => ['class1']])], [new Attribute(['class' => ['example-class']]), new Attribute(['class' => ['class1']]), new Attribute(['class' => ['example-class', 'class1']])], diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php index a86dc826df8..cfa4c6ba001 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php @@ -121,7 +121,7 @@ class TwigExtensionTest extends UnitTestCase { * An array of test data each containing of a twig template string and * a boolean expecting whether the path will be safe. */ - public function providerTestEscaping() { + public static function providerTestEscaping() { return [ ['{{ path("foo") }}', FALSE], ['{{ path("foo", {}) }}', FALSE], @@ -377,7 +377,7 @@ class TwigExtensionTest extends UnitTestCase { /** * Data provider for ::testRenderVarEarlyReturn(). */ - public function providerTestRenderVarEarlyReturn() { + public static function providerTestRenderVarEarlyReturn() { return [ 'null' => ['', NULL], 'empty array' => ['', []], @@ -449,7 +449,7 @@ class TwigExtensionTest extends UnitTestCase { * * @return \Iterator */ - public function providerTestTwigAddSuggestionFilter(): \Iterator { + public static function providerTestTwigAddSuggestionFilter(): \Iterator { yield 'suggestion should be added' => [ [ '#theme' => 'kitten', @@ -565,7 +565,7 @@ class TwigExtensionTest extends UnitTestCase { * * @return \Iterator */ - public function providerTestTwigAddClass(): \Iterator { + public static function providerTestTwigAddClass(): \Iterator { yield 'should add a class on element' => [ ['#type' => 'container'], 'my-class', @@ -615,7 +615,7 @@ class TwigExtensionTest extends UnitTestCase { * * @return \Iterator */ - public function providerTestTwigSetAttribute(): \Iterator { + public static function providerTestTwigSetAttribute(): \Iterator { yield 'should add attributes on element' => [ ['#theme' => 'image'], 'title', diff --git a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php index bbd23940602..10c81894a44 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php @@ -57,7 +57,7 @@ class TwigSandboxTest extends UnitTestCase { * * @return array */ - public function getTwigEntityDangerousMethods() { + public static function getTwigEntityDangerousMethods() { return [ ['{{ entity.delete }}'], ['{{ entity.save }}'], diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeRequiresTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeRequiresTest.php index ccfd4a5d5fc..cf0e731ae8e 100644 --- a/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeRequiresTest.php +++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeRequiresTest.php @@ -35,7 +35,7 @@ class PhpUnitBridgeRequiresTest extends UnitTestCase { /** * Data provider for ::testWillNeverRun(). */ - public function providerTestWillNeverRun(): array { + public static function providerTestWillNeverRun(): array { return [ ['this_will_never_run'], ]; diff --git a/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php b/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php index a1e6534a05a..52c6e7980c2 100644 --- a/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php +++ b/core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php @@ -99,7 +99,7 @@ class PhpUnitTestRunnerTest extends UnitTestCase { $this->assertStringEndsWith('phpunit-23.xml', $runner->xmlLogFilePath(23)); } - public function providerTestSummarizeResults() { + public static function providerTestSummarizeResults() { return [ [ [ diff --git a/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php b/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php index f4059252c11..dbcb853143d 100644 --- a/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php +++ b/core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php @@ -14,7 +14,7 @@ use Drupal\Tests\UnitTestCase; */ class TestFileParserTest extends UnitTestCase { - public function provideTestFileContents() { + public static function provideTestFileContents() { return [ 'empty' => [[], ''], 'no-namespace' => [['ConcreteClass'], diff --git a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php index 8412a33c1d2..a96d79e38a6 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php @@ -43,7 +43,7 @@ class TestDatabaseTest extends UnitTestCase { /** * Data provider for self::testConstructor() */ - public function providerTestConstructor() { + public static function providerTestConstructor() { return [ ['test1234', 'test1234', 'sites/simpletest/1234'], ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567'], diff --git a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php index bff678550fb..9b9053c3ba8 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php @@ -29,7 +29,7 @@ class TestDiscoveryTest extends UnitTestCase { $this->assertEquals($expected, $info); } - public function infoParserProvider() { + public static function infoParserProvider() { // A module provided unit test. $tests[] = [ // Expected result. @@ -447,7 +447,7 @@ EOF; $this->assertEquals($expected, TestDiscovery::getPhpunitTestSuite($classname)); } - public function providerTestGetPhpunitTestSuite() { + public static function providerTestGetPhpunitTestSuite() { $data = []; $data['simpletest-web test'] = ['\Drupal\rest\Tests\NodeTest', FALSE]; $data['module-unittest'] = [static::class, 'Unit']; diff --git a/core/tests/Drupal/Tests/Core/Test/XdebugRequestTraitTest.php b/core/tests/Drupal/Tests/Core/Test/XdebugRequestTraitTest.php index d2dc38ba58f..7525b074b53 100644 --- a/core/tests/Drupal/Tests/Core/Test/XdebugRequestTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Test/XdebugRequestTraitTest.php @@ -40,7 +40,7 @@ class XdebugRequestTraitTest extends UnitTestCase { * @return iterable * Test scenarios. */ - public function extractCookiesDataProvider() { + public static function extractCookiesDataProvider() { yield 'no XDEBUG_CONFIG' => [[], []]; yield 'empty string XDEBUG_CONFIG' => [['XDEBUG_CONFIG' => ''], []]; yield 'only space string XDEBUG_CONFIG' => [['XDEBUG_CONFIG' => ' '], []]; diff --git a/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php b/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php index 06dea22a55c..612dbb10797 100644 --- a/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php @@ -68,7 +68,7 @@ class AjaxBasePageNegotiatorTest extends UnitTestCase { $this->assertSame($expected, $result); } - public function providerTestApplies() { + public static function providerTestApplies() { $data = []; $data['empty'] = [[], FALSE]; $data['no_theme'] = [['ajax_page_state' => ['theme' => '', 'theme_token' => '']], FALSE]; diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php index abec03963a7..9a4ecb89b61 100644 --- a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php @@ -218,7 +218,7 @@ class RegistryTest extends UnitTestCase { /** * Provides test data to ::testPostProcessExtension(). */ - public function providerTestPostProcessExtension() { + public static function providerTestPostProcessExtension() { // This is test data for unit testing // \Drupal\Core\Theme\Registry::postProcessExtension(), not what happens // before it. Therefore, for all test data: diff --git a/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php index a1f39fc1fc2..b395c49ed9f 100644 --- a/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php +++ b/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php @@ -63,7 +63,7 @@ class PhpTransliterationTest extends UnitTestCase { * * @return array */ - public function providerTestPhpTransliterationWithAlter() { + public static function providerTestPhpTransliterationWithAlter() { $random_generator = new Random(); $random = $random_generator->string(10); // Make some strings with two, three, and four-byte characters for testing. diff --git a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php index 6cd4baad895..c2cda9eaa94 100644 --- a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php +++ b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php @@ -78,7 +78,7 @@ class UnroutedUrlTest extends UnitTestCase { /** * Data provider for testFromUri(). */ - public function providerFromUri() { + public static function providerFromUri() { return [ // [$uri, $is_external] // An external URI. @@ -112,7 +112,7 @@ class UnroutedUrlTest extends UnitTestCase { /** * Data provider for testFromInvalidUri(). */ - public function providerFromInvalidUri() { + public static function providerFromInvalidUri() { return [ // Schemeless paths. ['test'], diff --git a/core/tests/Drupal/Tests/Core/UrlTest.php b/core/tests/Drupal/Tests/Core/UrlTest.php index 84115cd8e0d..b5ba9987532 100644 --- a/core/tests/Drupal/Tests/Core/UrlTest.php +++ b/core/tests/Drupal/Tests/Core/UrlTest.php @@ -543,7 +543,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for testing entity URIs. */ - public function providerTestEntityUris() { + public static function providerTestEntityUris() { return [ [ 'entity:test_entity/1', @@ -645,7 +645,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for testing string entity URIs. */ - public function providerTestToUriStringForEntity() { + public static function providerTestToUriStringForEntity() { return [ ['entity:test_entity/1', [], 'route:entity.test_entity.canonical;test_entity=1'], ['entity:test_entity/1', ['fragment' => 'top', 'query' => ['page' => '2']], 'route:entity.test_entity.canonical;test_entity=1?page=2#top'], @@ -676,7 +676,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for testing internal URIs. */ - public function providerTestToUriStringForInternal() { + public static function providerTestToUriStringForInternal() { return [ // The four permutations of a regular path. ['internal:/test-entity/1', [], 'route:entity.test_entity.canonical;test_entity=1'], @@ -712,7 +712,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for testFromValidInternalUri(). */ - public function providerFromValidInternalUri() { + public static function providerFromValidInternalUri() { return [ // Normal paths with a leading slash. ['/kittens'], @@ -752,7 +752,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for testFromInvalidInternalUri(). */ - public function providerFromInvalidInternalUri() { + public static function providerFromInvalidInternalUri() { return [ // Normal paths without a leading slash. 'normal_path0' => ['kittens'], @@ -799,7 +799,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for testing route: URIs. */ - public function providerTestToUriStringForRoute() { + public static function providerTestToUriStringForRoute() { return [ ['route:entity.test_entity.canonical;test_entity=1', [], 'route:entity.test_entity.canonical;test_entity=1'], ['route:entity.test_entity.canonical;test_entity=1', ['fragment' => 'top', 'query' => ['page' => '2']], 'route:entity.test_entity.canonical;test_entity=1?page=2#top'], @@ -844,7 +844,7 @@ class UrlTest extends UnitTestCase { /** * Data provider for the access test methods. */ - public function accessProvider() { + public static function accessProvider() { return [ [TRUE], [FALSE], diff --git a/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php b/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php index 5df85c60736..66da0ca7eda 100644 --- a/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php @@ -128,7 +128,7 @@ class CallableResolverTest extends UnitTestCase { /** * Test cases for ::testCallbackResolverExceptionHandling. */ - public function callableResolverExceptionHandlingTestCases() { + public static function callableResolverExceptionHandlingTestCases() { return [ 'String function' => [ 'not_a_callable', diff --git a/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php b/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php index 33981539ddc..46a6ac0d429 100644 --- a/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php @@ -91,7 +91,7 @@ class LinkGeneratorTest extends UnitTestCase { * @return array * Returns some test data. */ - public function providerTestGenerateHrefs() { + public static function providerTestGenerateHrefs() { return [ // Test that the URL returned by the URL generator is used. ['test_route_1', [], FALSE, '/test-route-1'], diff --git a/core/tests/Drupal/Tests/Core/Utility/PhpRequirementsTest.php b/core/tests/Drupal/Tests/Core/Utility/PhpRequirementsTest.php index af857527c2c..f91417a7b8f 100644 --- a/core/tests/Drupal/Tests/Core/Utility/PhpRequirementsTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/PhpRequirementsTest.php @@ -86,7 +86,7 @@ class PhpRequirementsTest extends UnitTestCase { * @return \Generator * Test scenarios. */ - public function providerMinimumSupportedPhp(): \Generator { + public static function providerMinimumSupportedPhp(): \Generator { $eol_lists = []; // Test against the known valid data from 9.0.0 to 9.3.0. diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php index 7b5864b7b55..538e13aa27a 100644 --- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php @@ -279,7 +279,7 @@ class TokenTest extends UnitTestCase { $this->assertEquals($expected, $result); } - public function providerTestReplaceEscaping() { + public static function providerTestReplaceEscaping() { $data = []; // No tokens. The first argument to Token::replace() should not be escaped. diff --git a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php index 9f354d61b58..a1a6aed5c92 100644 --- a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php @@ -89,7 +89,7 @@ class UnroutedUrlAssemblerTest extends UnitTestCase { /** * Provides test data for testAssembleWithExternalUrl. */ - public function providerTestAssembleWithExternalUrl() { + public static function providerTestAssembleWithExternalUrl() { return [ ['http://example.com/test', [], 'http://example.com/test'], ['http://example.com/test', ['fragment' => 'example'], 'http://example.com/test#example'], @@ -122,7 +122,7 @@ class UnroutedUrlAssemblerTest extends UnitTestCase { /** * @return array */ - public function providerTestAssembleWithLocalUri() { + public static function providerTestAssembleWithLocalUri() { return [ ['base:example', [], FALSE, '/example'], ['base:example', ['query' => ['foo' => 'bar']], FALSE, '/example?foo=bar'], |