diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php index 3e5ce2503265e4e1e912ae85c5b42c469679d115..31ccc25bba6fffd0a53e17eca416556fd6ff7d4d 100644 --- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php +++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php @@ -38,7 +38,7 @@ abstract class AggregatorTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create an Article node type. diff --git a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php index 58cb7048881e0107cf0d1f2ad17b3cdfca2179e7..70a5bc02145c863e9e18c49d3f20c4a54b7498d7 100644 --- a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php +++ b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php @@ -42,7 +42,7 @@ class BigPipeRegressionTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Use the big_pipe_test_theme theme. diff --git a/core/modules/block/tests/src/Functional/BlockTestBase.php b/core/modules/block/tests/src/Functional/BlockTestBase.php index 83b7de0060a5c59d6c97c0eb2d1761f4c17b9b3e..04b7c91e2a29e8ed95622cb88ae94f8e5581e4c5 100644 --- a/core/modules/block/tests/src/Functional/BlockTestBase.php +++ b/core/modules/block/tests/src/Functional/BlockTestBase.php @@ -40,7 +40,7 @@ abstract class BlockTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Use the test page as the front page. diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php index 43220d1e73c6d5b719fff002f51272886f58a82d..baf521f862b7d8aa9237b2cd68ad442814877de7 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php @@ -51,7 +51,7 @@ abstract class BlockContentTestBase extends BrowserTestBase { /** * Sets the test up. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); if ($this->autoCreateBasicBlockType) { $this->createBlockContentType('basic', TRUE); diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php index 60249e60e47f4fbb5b1493e42fe9d9eab4faaba4..2946c9cadb97050b1919dd4b73829d9b891d5f0a 100644 --- a/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php +++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentFieldFilterTest.php @@ -39,7 +39,7 @@ class BlockContentFieldFilterTest extends BlockContentTestBase { /** * {@inheritdoc} */ - public function setUp($import_test_views = TRUE): void { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); // Add two new languages. diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php index 766e43fb780c076cc59212ca69290e06d6cd2307..04b270f7a9d13d638fde8c6e8fe8f25a2e103911 100644 --- a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php @@ -40,7 +40,7 @@ abstract class BlockContentTestBase extends ViewTestBase { 'block_content_test_views', ]; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); // Ensure the basic bundle exists. This is provided by the standard profile. $this->createBlockContentType(['id' => 'basic']); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php index 14833adff6079366b4339285f3e6f56a11026400..c8e5a5706b64aacba4b21376a46873cc3dcaa941 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentDeletionTest.php @@ -22,7 +22,7 @@ class BlockContentDeletionTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installEntitySchema('block_content'); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php index 640bbb1eda05325f760028f084a2912b229adfeb..3695c591b634aac519d4d4d914d21f6d1349542e 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentDeriverTest.php @@ -22,7 +22,7 @@ class BlockContentDeriverTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installEntitySchema('block_content'); diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php index 738a809355ecec9ed3ac8597321e1da345ffc093..53d9562cec562853c569bcdfe89380e1485314fb 100644 --- a/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php +++ b/core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php @@ -65,7 +65,7 @@ class BlockContentEntityReferenceSelectionTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installSchema('system', ['sequences']); $this->installEntitySchema('user'); diff --git a/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php b/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php index 1c6b56bb12fb2fe18d4552410f8297ffeb567b18..76e296197e846a6c63e91802cf372fd8872876a1 100644 --- a/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php +++ b/core/modules/ckeditor/tests/src/Unit/Plugin/CKEditorPlugin/LanguageTest.php @@ -23,7 +23,7 @@ class LanguageTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { $this->plugin = new Language([], $this->randomMachineName(), []); } diff --git a/core/modules/comment/tests/src/Functional/CommentTestBase.php b/core/modules/comment/tests/src/Functional/CommentTestBase.php index 9b44b420959c33a9e28467d3a0feab229070ff21..138021e87666b56dc159316e9e54a0eeb7266236 100644 --- a/core/modules/comment/tests/src/Functional/CommentTestBase.php +++ b/core/modules/comment/tests/src/Functional/CommentTestBase.php @@ -54,7 +54,7 @@ abstract class CommentTestBase extends BrowserTestBase { */ protected $node; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create an article content type only if it does not yet exist, so that diff --git a/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php b/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php index eda163549779f8dfe1c3b8e79f28b4b5b82a01fe..9cf1873c87d3c5ab7f44e5ed53f21cc5e83205d5 100644 --- a/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php +++ b/core/modules/comment/tests/src/Functional/Views/CommentTestBase.php @@ -56,7 +56,7 @@ abstract class CommentTestBase extends ViewTestBase { */ protected $comment; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); ViewTestData::createTestViews(static::class, ['comment_test_views']); diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php b/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php index ec274bbe191472b906ee64bf013b87305a446169..b10828a90a1f41d89f34f27156f460fd77ccc629 100644 --- a/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php +++ b/core/modules/comment/tests/src/Kernel/Views/CommentViewsKernelTestBase.php @@ -39,7 +39,7 @@ abstract class CommentViewsKernelTestBase extends ViewsKernelTestBase { */ protected $userStorage; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); ViewTestData::createTestViews(static::class, ['comment_test_views']); diff --git a/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php b/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php index 6797bca5f0142a7c348674845cc9d4571d20de92..64cc55f1b02e2bfdf6a107feb77cabd1410a2d3d 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModeratedContentLocalTaskTest.php @@ -35,7 +35,7 @@ class ModeratedContentLocalTaskTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->drupalPlaceBlock('local_tasks_block'); diff --git a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php index 218e1c3c01c26b24607e7837437e1eb5b8b20643..cf01a082a097cc751cebdf677f7f82106e0a2cdc 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModeratedContentViewTest.php @@ -42,7 +42,7 @@ class ModeratedContentViewTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page'])->save(); diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php index 5d3a98965be48a158a7043002321bf4d05b02b0d..e395a0ac5b1a56ebbeaa9d2b29f5a43543cec097 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php @@ -36,7 +36,7 @@ class ModerationActionsTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $moderated_bundle = $this->createContentType(['type' => 'moderated_bundle']); diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php index 069fe789150024c90a033e6cd43442c926134759..71a6925a43c79cecf283bc611463f818f8f08d22 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationRevisionRevertTest.php @@ -34,7 +34,7 @@ class ModerationRevisionRevertTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $moderated_bundle = $this->createContentType(['type' => 'moderated_bundle']); diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php b/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php index 7e254eadfacc82da0a2fe73d04715070b1b923ad..350c8d0d87a7099e51109d8a37dc14537e4d1c57 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationStateTestBase.php @@ -72,7 +72,7 @@ abstract class ModerationStateTestBase extends BrowserTestBase { /** * Sets the test up. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->workflow = $this->createEditorialWorkflow(); $this->adminUser = $this->drupalCreateUser($this->permissions); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php index dbf00f2c3477e154c65bb668c7f2c667d3aabcb9..947e4ed6dc460a482e18e6db95d39cfa83203514 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationPendingRevisionTestBase.php @@ -48,7 +48,7 @@ abstract class ContentTranslationPendingRevisionTestBase extends ContentTranslat /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { $this->entityTypeId = 'node'; $this->bundle = 'article'; diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php index 17d40b7a8bac301f4bc0fd9d281bc241e16142f0..a14cd5902b90cc04b216a880d8983ed7a72ce01e 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php @@ -82,7 +82,7 @@ abstract class ContentTranslationTestBase extends BrowserTestBase { */ protected $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->setupLanguages(); diff --git a/core/modules/datetime/tests/src/Functional/DateTestBase.php b/core/modules/datetime/tests/src/Functional/DateTestBase.php index 4fce222082a9bd414376766530025523e57a7390..2581b0eec5a3bc1ed57f1a3ce43f07c459b539c4 100644 --- a/core/modules/datetime/tests/src/Functional/DateTestBase.php +++ b/core/modules/datetime/tests/src/Functional/DateTestBase.php @@ -88,7 +88,7 @@ abstract protected function getTestFieldType(); /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $web_user = $this->drupalCreateUser([ diff --git a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php index 04e38fd0163e29805ea78ccb784374e787e58f24..cf1c247f39172613c4f7e22a9a69c97d5d162660 100644 --- a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php +++ b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDateonlyTest.php @@ -47,7 +47,7 @@ class EntityTestDateonlyTest extends EntityTestResourceTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Add datetime field. diff --git a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php index 2030900cf42137cf6956e16ecd9fbab14aa34a01..34474958af81e8649ace269dde023a9340736c2a 100644 --- a/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php +++ b/core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php @@ -47,7 +47,7 @@ class EntityTestDatetimeTest extends EntityTestResourceTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Add datetime field. diff --git a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php index 4c48cd3f6fc7bc60351d309dd6d4ccb063c09876..0cb21d7b2b9b4709ad88cfbaef0398fe3015a9e5 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php @@ -47,7 +47,7 @@ abstract class DateTimeHandlerTestBase extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->installSchema('node', 'node_access'); diff --git a/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php b/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php index 636221f95117a9703b94d89dafe44d09a1f86ddb..9e5ee8264cce50bb302a6b5a86e3557757c3767a 100644 --- a/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php +++ b/core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php @@ -47,7 +47,7 @@ class EntityTestDateRangeTest extends EntityTestResourceTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Add datetime_range field. diff --git a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php index 4294949ef995dabc0490ac401d2e45e51d4e2d83..38c1af1f3a00bc0699be475be8a6a8b23144df84 100644 --- a/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogResourceTest.php @@ -50,7 +50,7 @@ class DbLogResourceTest extends ResourceTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $auth = isset(static::$auth) ? [static::$auth] : []; diff --git a/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php b/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php index 2aac3efe53c1b2a4227a149a6a3fd49eb26a71e0..60768f1fa62c2d723604c087a48f5176a85b5455 100644 --- a/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php +++ b/core/modules/dblog/tests/src/Kernel/DbLogControllerTest.php @@ -17,7 +17,7 @@ class DbLogControllerTest extends KernelTestBase { */ protected static $modules = ['dblog', 'user']; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installSchema('dblog', ['watchdog']); diff --git a/core/modules/field/tests/src/Functional/Views/FieldTestBase.php b/core/modules/field/tests/src/Functional/Views/FieldTestBase.php index 7a47b4140f71db52cbb8065bdd9901f9d025f2af..5bda2f24da83ba1b89741ae0638ac5b4fcbbd66f 100644 --- a/core/modules/field/tests/src/Functional/Views/FieldTestBase.php +++ b/core/modules/field/tests/src/Functional/Views/FieldTestBase.php @@ -42,7 +42,7 @@ abstract class FieldTestBase extends ViewTestBase { */ public $fields; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); // Ensure the page node type exists. diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php index 15ef3afe92fb0944ccee2524a0c16b4f2e709c23..24ee72628220a092ba9a219133e34e15ae81a244 100644 --- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php @@ -38,7 +38,7 @@ class FieldCrudTest extends FieldKernelTestBase { */ protected $fieldDefinition; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->fieldStorageDefinition = [ diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php index 521c9a781a22f22bf922404b8524d7ed44566bc3..e9eb7839624ea4225b3888bbe378c3edfac03454 100644 --- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php +++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php @@ -47,7 +47,7 @@ abstract class FieldKernelTestBase extends KernelTestBase { /** * Set the default field storage backend for fields created during tests. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->fieldTestData = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php index 940f91d72db176b1bd98b39f8af8fceff330d16e..95ff3db1edd352f955e9ccf841e9cf2f2a9eaa54 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldInstanceLabelDescriptionTest.php @@ -29,7 +29,7 @@ class MigrateFieldInstanceLabelDescriptionTest extends MigrateDrupal6TestBase im /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->migrateFields(); diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php index 161f6cd94651760c4b4491a459fe244dbfefca39..a777d25b3c115c6ac87b27cb6b544df7f05933b9 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceLabelDescriptionTest.php @@ -39,7 +39,7 @@ class MigrateFieldInstanceLabelDescriptionTest extends MigrateDrupal7TestBase im /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('node'); diff --git a/core/modules/file/tests/src/Functional/FileFieldTestBase.php b/core/modules/file/tests/src/Functional/FileFieldTestBase.php index cbfe67fa3c18eb8642310658eccc5d27a5cac14d..2fa0f534a4228cc4da785d6c7c57a0ac504e49c7 100644 --- a/core/modules/file/tests/src/Functional/FileFieldTestBase.php +++ b/core/modules/file/tests/src/Functional/FileFieldTestBase.php @@ -35,7 +35,7 @@ abstract class FileFieldTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->adminUser = $this->drupalCreateUser([ 'access content', diff --git a/core/modules/file/tests/src/Functional/FileManagedTestBase.php b/core/modules/file/tests/src/Functional/FileManagedTestBase.php index f9b14434c565c14efaa28a1ed7f9a310f1dbe65f..17f0e1a91a97a2224947b6636467ddeacc7d17fb 100644 --- a/core/modules/file/tests/src/Functional/FileManagedTestBase.php +++ b/core/modules/file/tests/src/Functional/FileManagedTestBase.php @@ -20,7 +20,7 @@ abstract class FileManagedTestBase extends BrowserTestBase { */ protected static $modules = ['file_test', 'file']; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Clear out any hook calls. file_test_reset(); diff --git a/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php b/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php index aca03382dabcc5fb8c439bb7e30dc1bd27d1e7b8..df630fad2a1fd817d6b57bd03b824b9bc013272d 100644 --- a/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php +++ b/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php @@ -26,7 +26,7 @@ abstract class FileMediaFormatterTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->drupalLogin($this->drupalCreateUser(['view test entity'])); } diff --git a/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php b/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php index 53012f3d9c7e05bb174bed75cddf5b805add035d..5b148a06dd06205e3085c6f6d05eb5877050039e 100644 --- a/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php +++ b/core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php @@ -21,7 +21,7 @@ abstract class FileManagedUnitTestBase extends KernelTestBase { */ protected static $modules = ['file_test', 'file', 'system', 'field', 'user']; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Clear out any hook calls. file_test_reset(); diff --git a/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php b/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php index f61890e6de1758b4478e61dfa2f936d200bbdff0..9f2e4fb841c64b346be5bbc0e7172a17f69e29e0 100644 --- a/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php +++ b/core/modules/hal/tests/src/Kernel/NormalizerTestBase.php @@ -53,7 +53,7 @@ abstract class NormalizerTestBase extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php b/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php index c2f1158aa543f5e7de4b331a01cb2fb6b1c40f7b..8ddc65373ab4e37fda2ecc624c0e09f2a07440f7 100644 --- a/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php +++ b/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php @@ -25,7 +25,7 @@ abstract class HelpTopicTranslatedTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // These tests rely on some markup from the 'Seven' theme. diff --git a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php index 82cef6e7757ce1c85913c823383d94f416efe9cc..f56106519143b59f7eef73c7c0f5eca80ef5b9c8 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldTestBase.php +++ b/core/modules/image/tests/src/Functional/ImageFieldTestBase.php @@ -45,7 +45,7 @@ abstract class ImageFieldTestBase extends BrowserTestBase { */ protected $adminUser; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create Basic page and Article node types. diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php index faf352ed1675f8f59d65d2a1ad5fc758ce3b9ba5..3e8bf2450183c0aa582f92a035150afbda8850e4 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php @@ -38,7 +38,7 @@ abstract class ImageFieldTestBase extends WebDriverTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create Basic page and Article node types. diff --git a/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php b/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php index 3214ca43018b517b3098f64bd0e9aa4db3fc4d5a..1963cb02b9ea50db3afc7669df6f017d5414c9f7 100644 --- a/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php +++ b/core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php @@ -59,7 +59,7 @@ class ExternalNormalizersTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // This test is not about access control at all, so allow anonymous users to diff --git a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php index a44424b61c40b44c38bff2d679e84f35740c5a2d..415b717dceda8b2f8368cbe3e81c65f206bdddde 100644 --- a/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php +++ b/core/modules/jsonapi/tests/src/Functional/FileUploadTest.php @@ -105,7 +105,7 @@ class FileUploadTest extends ResourceTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->fileStorage = $this->container->get('entity_type.manager') diff --git a/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php b/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php index 032c49698e53a75b98520d41d8ce900600e79df6..5d873695442a5b407e75ac602debf1098946efba 100644 --- a/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php +++ b/core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php @@ -59,7 +59,7 @@ class InternalEntitiesTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->testUser = $this->drupalCreateUser([ 'view test entity', diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php index 832278be1b5b244720d4fd0d01b3ddee84ec52f3..e6f4713a653f859d1bc87ce9e6dc0018cfb4b12f 100644 --- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php +++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php @@ -92,7 +92,7 @@ abstract class JsonApiFunctionalTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Set up a HTTP client that accepts relative URLs. diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php index ada184a7d820447599b056410b2b14a13f331db9..50f93b80242766b9d9bd43f45d627360a4d6c127 100644 --- a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +++ b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php @@ -216,7 +216,7 @@ abstract class ResourceTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->serializer = $this->container->get('jsonapi.serializer'); diff --git a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php index d58bc02b2f70b304397fd0d95021b16014b60e6e..317550c40b6e7e9fd22bca26feacd2a0bd217a28 100644 --- a/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php +++ b/core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php @@ -61,7 +61,7 @@ protected function setUpAuthorization($method) { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Set up a HTTP client that accepts relative URLs. diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index c9154a6d445f8a4b9d47898696f3e697fe5a704c..c3ee121f41d86c1211bdf1bf98e240e4164641e5 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -199,7 +199,7 @@ protected function setUp(): void { /** * {@inheritdoc} */ - public function tearDown(): void { + protected function tearDown(): void { if ($this->node) { $this->node->delete(); } diff --git a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php index 10d14408721f89f70f33e6379b4ca524a7b4d02e..8474c6c6be7e50897560e27f5edf22968eb356be 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php @@ -56,7 +56,7 @@ class FilterTest extends JsonapiKernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->setUpSchemas(); diff --git a/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php b/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php index e6c1c566cfaa7927933d7e94910854302cff021a..15c522abd1809955f60504fe5b097000703f70df 100644 --- a/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php +++ b/core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php @@ -33,7 +33,7 @@ class ResourceResponseValidatorTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Check that the validation class is available. if (!class_exists("\\JsonSchema\\Validator")) { diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index 337d72675fd9849477ae756ef6be1822c0368d37..589a0d48914a8aac0ef6a11a5d24e9bf2ae13649 100644 --- a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -35,7 +35,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { $resource_type_repository = $this->prophesize(ResourceTypeRepository::class); $field_resolver = $this->prophesize(FieldResolver::class); diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php index 70adf33c5c62cc59fdeb5e2bf5ac697b9c2614e3..c546f6f1855ee08879e189afbf23511e1766bc42 100644 --- a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php @@ -44,7 +44,7 @@ class ResourceIdentifierNormalizerTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { $target_resource_type = new ResourceType('lorem', 'dummy_bundle', NULL); $relationship_fields = [ 'field_dummy' => new ResourceTypeRelationship('field_dummy'), diff --git a/core/modules/language/tests/src/Kernel/LanguageTestBase.php b/core/modules/language/tests/src/Kernel/LanguageTestBase.php index 458eeaec53a2444a8ae6bab2ce97eeaa08d8813f..26077dfb0102d16a522d9cbcb2c90636f0193384 100644 --- a/core/modules/language/tests/src/Kernel/LanguageTestBase.php +++ b/core/modules/language/tests/src/Kernel/LanguageTestBase.php @@ -27,7 +27,7 @@ abstract class LanguageTestBase extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installConfig(['language']); diff --git a/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php b/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php index fc4cabf1ba82bba02ca7d2b7f5600828dcea2287..4156fb2aa0ffdd38bf0bf50509e9f7584301c3e3 100644 --- a/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php +++ b/core/modules/language/tests/src/Kernel/Views/LanguageTestBase.php @@ -17,7 +17,7 @@ abstract class LanguageTestBase extends ViewsKernelTestBase { */ protected static $modules = ['system', 'language']; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp(); $this->installConfig(['language']); diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php index 377084483683673c66459c2b98c00191976f1a37..5c6e9786ccbe75d6ddd3322db525c0573d9735b0 100644 --- a/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php +++ b/core/modules/layout_builder/tests/src/Functional/Rest/LayoutRestTestBase.php @@ -43,7 +43,7 @@ abstract class LayoutRestTestBase extends ResourceTestBase { /** * {@inheritdoc} */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $assert_session = $this->assertSession(); diff --git a/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php b/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php index 9ea9fccec14d73ce01b2f147c8d851d5a0162ee9..9f7f75d39fa3cf53618ef861544b38a51582aa41 100644 --- a/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php +++ b/core/modules/layout_builder/tests/src/Functional/Rest/OverrideSectionsTest.php @@ -28,7 +28,7 @@ class OverrideSectionsTest extends LayoutRestTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // @todo Figure why field definitions have to cleared in // https://www.drupal.org/project/drupal/issues/2985882. diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php index dbf68d6179c17127459d5cbd97bef894fe6a0208..293c450a915269d37d724dbc688f1ee6db8fc8a7 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php @@ -44,7 +44,7 @@ abstract class InlineBlockTestBase extends WebDriverTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->drupalPlaceBlock('local_tasks_block'); diff --git a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php index 629f530cc08ab4c2ed85672ea62f7525624d8af2..c6967eccc288ffa915786833a8da0036e3e6ecbf 100644 --- a/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php @@ -37,7 +37,7 @@ abstract class LayoutBuilderCompatibilityTestBase extends EntityKernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('entity_test_base_field_display'); diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php index e6ddd71ee34181be387ae1eeda28ae476210e3fc..8edaa63773f04fe345985fe29bfabcecaba5903f 100644 --- a/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php @@ -52,7 +52,7 @@ abstract class LocaleUpdateBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Setup timestamps to identify old and new translation sources. diff --git a/core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php b/core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php index 379ba74717911f23b95494a476b209c2845ad166..702518dac35a537533180b468ab0dba4ee2ede9e 100644 --- a/core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php +++ b/core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php @@ -56,7 +56,7 @@ trait MediaFunctionalTestTrait { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Have two users ready to be used in tests. diff --git a/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php b/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php index e3889ca80202852186e273eeec45906b760ce16e..eddbd54083c3cfe5d3b62fa2d89185fab616c75c 100644 --- a/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php +++ b/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php @@ -41,7 +41,7 @@ abstract class MediaResourceTestBase extends EntityResourceTestBase { /** * {@inheritdoc} */ - public function setUp() { + protected function setUp(): void { parent::setUp(); \Drupal::configFactory() diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php index be926347c3710ea16120c1a6d21ee371e241a7e8..aadfcc54b2ad2bf498b8d4124d7fbafd6768f2bd 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php @@ -14,7 +14,7 @@ abstract class MediaSourceTestBase extends MediaJavascriptTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Let's set the canonical flag in the base class of the source tests, diff --git a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php index 231356635ba86f0f893d0e59c50be05f56419a21..46c327def2e695a1d2faa358c85a267944928e39 100644 --- a/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php +++ b/core/modules/media/tests/src/Kernel/MediaEmbedFilterTestBase.php @@ -67,7 +67,7 @@ abstract class MediaEmbedFilterTestBase extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installSchema('file', ['file_usage']); diff --git a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php index 8996f03fa454ff44e21fbfe65706681c4a76c8aa..34219df6208f0096d36b330b9c221775d5b4ab52 100644 --- a/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php +++ b/core/modules/media/tests/src/Kernel/MediaKernelTestBase.php @@ -56,7 +56,7 @@ abstract class MediaKernelTestBase extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); 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 0166df80c9b18a06efcbfbe859368bef4878e093..f52bd0f99061d4386d28bee53a101546e7137062 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 @@ -31,7 +31,7 @@ class LinkUriTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->setUpCurrentUser(); $this->installEntitySchema('node'); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php index 65e3f13143c9db12deb7c68141926434b882b78d..8b79c66eb45adee2bda0ef3bd0846cd35bd32a9b 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php @@ -16,7 +16,7 @@ class MigrateExecutableTest extends MigrateTestBase { 'user', ]; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php index 5a019ec2fd158bd99be5ab6803c29108729fddf9..f7e8ffae3a3b13a5f94d4b285dfaca7fa45f4877 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateExternalTranslatedTest.php @@ -31,7 +31,7 @@ class MigrateExternalTranslatedTest extends MigrateTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installSchema('system', ['sequences']); $this->installSchema('node', ['node_access']); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php b/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php index 4b2ec45b7d3a97d0e1c0efef6eb0e29f36190982..4225653dda5beaf7d6b34d67834e4f2259177cee 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php @@ -36,7 +36,7 @@ class MigrateLookupTest extends MigrateTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->setTestLogger(); $this->migrateLookup = $this->container->get('migrate.lookup'); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php index 9efe7d0d4fefccbb9dcda4a747916a8a9bda768d..0c351aac4bedf39732624da27ee0873db6a5320a 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php @@ -53,7 +53,7 @@ abstract public function providerSource(); /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create a mock migration. This will be injected into the source plugin diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php index b9d3f66b644a3d7279d9414569d7f79590a356e3..b0481d792f8d72d9ca6d6db0640de6f8551a4704 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php @@ -63,7 +63,7 @@ abstract class MigrateTestBase extends KernelTestBase implements MigrateMessageI /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->createMigrationConnection(); $this->sourceDatabase = Database::getConnection('default', 'migrate'); @@ -104,7 +104,7 @@ private function createMigrationConnection() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { $this->cleanupMigrateConnection(); parent::tearDown(); $this->databaseDumpFiles = []; diff --git a/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php index 17ca386f1de5560d08e9219acde8f8b8e3f29a35..44fe7878babaf57dff244b6beaff33e177fc5c8b 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrationPluginManagerTest.php @@ -26,7 +26,7 @@ class MigrationPluginManagerTest extends MigrateTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->migrationPluginManager = \Drupal::service('plugin.manager.migration'); } diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php index f03d6241870290016fe549a95bdb6090ca2c9595..299f7e5e135e2f47329e14542485ffa76defd51d 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php @@ -37,7 +37,7 @@ class LogTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $definition = [ 'source' => [ 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 42f7c4626af9beec617b2b5bdf6b76057ec09735..4073829f28a00c0853e1cd45d73ad2d0ee795b1d 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 @@ -49,7 +49,7 @@ class SqlTest extends MigrateTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->database = \Drupal::database(); $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class) diff --git a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php index a6ff0931ea56e2b76f51cf15106599f6756fd29f..49eb4bbd39d56d1bdda54653f3a871d8ea290123 100644 --- a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php @@ -22,7 +22,7 @@ class MigrationPluginManagerTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Get a plugin manager for testing. diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php index 2d2e1b4cd653ca368cc8aa1643b9b15002d7db52..4a5ff3d8a1e207a2f71c107a0d8093fba6f9d325 100644 --- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php +++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php @@ -41,7 +41,7 @@ class EntityTestBase extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->migration = $this->prophesize(MigrationInterface::class); diff --git a/core/modules/migrate/tests/src/Unit/process/MigrateProcessTestCase.php b/core/modules/migrate/tests/src/Unit/process/MigrateProcessTestCase.php index cff1ee7359d0ba3c479fa3a5cc77c0c627598054..0f50059a3ff32be473718300d832730d27d66d90 100644 --- a/core/modules/migrate/tests/src/Unit/process/MigrateProcessTestCase.php +++ b/core/modules/migrate/tests/src/Unit/process/MigrateProcessTestCase.php @@ -24,7 +24,7 @@ abstract class MigrateProcessTestCase extends MigrateTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { $this->row = $this->getMockBuilder('Drupal\migrate\Row') ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php b/core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php index c22127dd9d8fe44de6a43a7ade98bebf6482c735..f23883aa8cec1466ac2ef86d4f37652261b0d5cc 100644 --- a/core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php +++ b/core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php @@ -28,7 +28,7 @@ abstract class MigrationLookupTestCase extends MigrateProcessTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->migrateStub = $this->prophesize(MigrateStub::class); $this->migrateLookup = $this->prophesize(MigrateLookupInterface::class); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php b/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php index 6a3ff44f031c2c8a2b463924605bec59fc568fb1..23a5667dbeb0a239309c9711da6cb57383ae1bdd 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php @@ -21,7 +21,7 @@ class IdMapTableNoDummyTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->pluginManager = $this->container->get('plugin.manager.migration'); $this->pluginManager->createInstance('d6_user'); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php index 803fb1fa12fc2ee3b894de6d4869d5e47c63838f..5cb4a954237e0d49640c6c5cdc85de9d662a5e4e 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateDrupalTestBase.php @@ -27,7 +27,7 @@ abstract class MigrateDrupalTestBase extends MigrateTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $module_handler = \Drupal::moduleHandler(); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php index 69bde8bfcac517a12e48b2c8573dca65e00139e8..ebd4df5be0e67b15dfb859502c20720bdd559913 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/MigrateFieldPluginManagerTest.php @@ -39,7 +39,7 @@ class MigrateFieldPluginManagerTest extends MigrateDrupalTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->pluginManager = $this->container->get('plugin.manager.migrate.field'); } 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 7085fa7239e5eb4738a1e93b2ad701d8fb64f9d5..1e561bcb0f44933697b0e4bea36f58d8b8edd267 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php @@ -65,7 +65,7 @@ class FieldDiscoveryTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installConfig(['node']); $this->executeMigration('d6_node_type'); diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php index ac58395aafedc8827f2d8818affedaa343fa0946..3634627457c7dbbf97ae7fbebf0dad5e6e7a78fc 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php @@ -29,7 +29,7 @@ abstract class MigrateDrupal6TestBase extends MigrateDrupalTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Add a node classic migrate table to the destination site so that tests // run by default with the classic node migrations. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php index 2e712542e4d6c85fc0f038feed22027334872593..cd08d217e2c5006a1fae78fe347a61ccd162de09 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php @@ -16,7 +16,7 @@ class MigrationProcessTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { self::$modules = array_keys($this->coreModuleListDataProvider()); parent::setUp(); } diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php index 03ee60ef0a75f1f5352969b8b6904dec2283df24..8f5767357ca41f002966b84d21b9d9d58bbccb91 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php @@ -19,7 +19,7 @@ class VariableTranslationCheckRequirementsTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->sourceDatabase->schema()->dropTable('i18n_variable'); } 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 f3074924aa4176e2a1ec0e6551285466177f21e3..04cc3c5975636df4596d5f657f93afa77bf7ca97 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php @@ -70,7 +70,7 @@ class FieldDiscoveryTest extends MigrateDrupal7TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installConfig(static::$modules); $node_types = [ diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php index d3cc3ead902730f87ea98acfabeb77335ba241ee..58ebb4aa4d970aef20c8decb3147173a5db9237c 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php @@ -16,7 +16,7 @@ abstract class MigrateDrupal7TestBase extends MigrateDrupalTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Add a node classic migrate table to the destination site so that tests // run by default with the classic node migrations. diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php index 9d0c24ae3e04c5906cae21695a2392b07c082ee5..24d8f7afe2cb87a09a979c60ec719a1b549ab54b 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php @@ -16,7 +16,7 @@ class MigrationProcessTest extends MigrateDrupal7TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { self::$modules = array_keys($this->coreModuleListDataProvider()); parent::setUp(); } diff --git a/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php index a08fd8393149b5a52cb68f9de85e1b64141aa825..1c60da83fee0ff124755af216774070ab7ad8454 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php @@ -42,7 +42,7 @@ class FieldDiscoveryTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->fieldPluginManager = $this->prophesize(MigrateFieldPluginManagerInterface::class); $this->migrationPluginManager = $this->prophesize(MigrationPluginManagerInterface::class); 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 8792b10223bc33e8037366c2e4f3370c9ba200a4..0be44f6ee39fb829797a05d864e9c6d97e35d3f3 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php @@ -64,7 +64,7 @@ class DrupalSqlBaseTest extends MigrateTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->pluginDefinition['requirements_met'] = TRUE; $this->pluginDefinition['source_module'] = 'module1'; diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php index 9b61a8bd7e51eea7f8883ff24374af0b82c7571d..6817d7af539cbd89781361dea431c461bf9c9c8e 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php @@ -14,7 +14,7 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create content. diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php index 9da21be807cc6ac6e4b2ff85000f361209f3c8c8..faef691cf4734cfe63c6c71ea974b4b6200c1777 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php @@ -46,7 +46,7 @@ abstract class MigrateUpgradeTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->createMigrationConnection(); $this->sourceDatabase = Database::getConnection('default', 'migrate_drupal_ui'); @@ -121,7 +121,7 @@ protected function createMigrationConnection() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { Database::removeConnection('migrate_drupal_ui'); parent::tearDown(); } diff --git a/core/modules/node/tests/src/Functional/NodeTestBase.php b/core/modules/node/tests/src/Functional/NodeTestBase.php index 44dc2faec0ebf710f7ca8108edf74b9d00d1a97d..4f33341115920bcc947cde12c4170ffe58a8401f 100644 --- a/core/modules/node/tests/src/Functional/NodeTestBase.php +++ b/core/modules/node/tests/src/Functional/NodeTestBase.php @@ -29,7 +29,7 @@ abstract class NodeTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create Basic page and Article node types. diff --git a/core/modules/node/tests/src/Functional/Views/NodeTestBase.php b/core/modules/node/tests/src/Functional/Views/NodeTestBase.php index 9e3062e6c854cbc7c589da2068defe69068d1815..0bbeef888e1d2343f745ee44e75076a4492aa8d2 100644 --- a/core/modules/node/tests/src/Functional/Views/NodeTestBase.php +++ b/core/modules/node/tests/src/Functional/Views/NodeTestBase.php @@ -18,7 +18,7 @@ abstract class NodeTestBase extends ViewTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); if ($import_test_views) { diff --git a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php index fd00a0e71c470ebf8ee61f7199078bdb29202977..5265eb9e844dc418716fc7b1bfb694e525897920 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php +++ b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php @@ -25,7 +25,7 @@ class NodePreviewLinkTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $filtered_html_format = FilterFormat::create([ diff --git a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php index ef1d92361fabf00d7b81d109a9f8a0767310db05..915355df8037340360626fed5cc0a725b7ec737c 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php +++ b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php @@ -24,7 +24,7 @@ class TestSettingSummariesContentType extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser(['administer content types']); diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php index 2794f4a61667839155a50fb1918670b2ba9e773a..9eef8e2159c16cc8a5c2526c8bc19e6df3411f57 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeDeriverTest.php @@ -20,7 +20,7 @@ class MigrateNodeDeriverTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->pluginManager = $this->container->get('plugin.manager.migration'); } diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php index e225003d0b6b4373720bb4c94d6f54cd7bc9b2e7..f6a0c3893ee85cb665e048305f03013f466ea977 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTestBase.php @@ -13,7 +13,7 @@ abstract class MigrateNodeTestBase extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('node'); diff --git a/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php b/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php index 32eca5d6ba2bd6eeb35250e08452c143413595d8..c3ff1d6c1c1d9fe8e19e2f92556974b4cd89c161 100644 --- a/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php +++ b/core/modules/node/tests/src/Kernel/NodeAccessTestBase.php @@ -52,7 +52,7 @@ abstract class NodeAccessTestBase extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installSchema('system', 'sequences'); $this->installSchema('node', 'node_access'); diff --git a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php index c188bba794ff0e4268ccec253a0ed144429a88a2..5a5f751dd6c7b24f554d5d5f1d6c435bc9edceb7 100644 --- a/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php +++ b/core/modules/options/tests/src/Functional/OptionsDynamicValuesTestBase.php @@ -33,7 +33,7 @@ abstract class OptionsDynamicValuesTestBase extends FieldTestBase { */ protected $fieldStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $field_name = 'test_options'; diff --git a/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php b/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php index af4ccc3421545aa795c9c660a57c671d33c81bb8..a4b9b0e069153bb1d7a01dd83bf65cea017fddad 100644 --- a/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php +++ b/core/modules/options/tests/src/Kernel/OptionsFieldUnitTestBase.php @@ -49,7 +49,7 @@ abstract class OptionsFieldUnitTestBase extends FieldKernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->fieldStorageDefinition = [ diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php b/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php index 8be66d1c25db9372e832092e9d1d5a5cbb76c1e7..5b6a55b6b95389aa2715bfc731fd53e1819c7ded 100644 --- a/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php +++ b/core/modules/options/tests/src/Kernel/Views/OptionsTestBase.php @@ -48,7 +48,7 @@ abstract class OptionsTestBase extends ViewsKernelTestBase { */ protected $fieldNames; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp(); $this->mockStandardInstall(); diff --git a/core/modules/path/tests/src/Functional/PathTestBase.php b/core/modules/path/tests/src/Functional/PathTestBase.php index 3e448f2565a9c86169236283323922bcff14c4c8..5749ff151bc936617e18b8f0171baf13a1a36976 100644 --- a/core/modules/path/tests/src/Functional/PathTestBase.php +++ b/core/modules/path/tests/src/Functional/PathTestBase.php @@ -19,7 +19,7 @@ abstract class PathTestBase extends BrowserTestBase { */ protected static $modules = ['node', 'path']; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create Basic page and Article node types. diff --git a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php index e3341ffd0b627d49e2734cac64a461d0c1b0c638..e31fae1c78c3ec7446271aef8f521733b1249cca 100644 --- a/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php +++ b/core/modules/path/tests/src/Kernel/Migrate/d7/MigrateUrlAliasTestBase.php @@ -29,7 +29,7 @@ abstract class MigrateUrlAliasTestBase extends MigrateDrupal7TestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('node'); diff --git a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php index b92af125ac4da8ee9276c8870e29f6e569412f2e..38a771f6d28fd3ce6e883eac87dc2dc9dab186fc 100644 --- a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php +++ b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php @@ -43,7 +43,7 @@ abstract class QuickEditTestBase extends KernelTestBase { /** * Sets the default field storage backend for fields created during tests. */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->fields = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); diff --git a/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php b/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php index 95b7b31109a9dee28df94529333aa050ee318278..f9c8776846405044685ee91cfd92843f3bf4bfd4 100644 --- a/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php +++ b/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php @@ -20,7 +20,7 @@ class MigrateResponsiveImageStylesTest extends MigrateDrupal7TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->executeMigrations(['d7_image_styles', 'd7_responsive_image_styles']); } diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 40c401bdf8026da27ce5a9109cc3f0c6ccf7066b..44fd2bd40704b72ea5f817baae7ac68658b71f0c 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -180,7 +180,7 @@ protected function provisionEntityResource($single_format = FALSE) { /** * {@inheritdoc} */ - public function setUp() { + protected function setUp(): void { parent::setUp(); // Calculate REST Resource config entity ID. diff --git a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php index c5381d5cdcdb20490647ce33dfa6d99ebbddf283..5156e095cdac81212504bcbcf9ecc0c34fd13b7f 100644 --- a/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php @@ -89,7 +89,7 @@ abstract class FileUploadResourceTestBase extends ResourceTestBase { /** * {@inheritdoc} */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->fileStorage = $this->container->get('entity_type.manager') diff --git a/core/modules/rest/tests/src/Functional/ResourceTestBase.php b/core/modules/rest/tests/src/Functional/ResourceTestBase.php index ce509970d5458bb2e4890915b4748d785608d26f..e7d48795419146ba9ddbc69f8f891becf3b46ceb 100644 --- a/core/modules/rest/tests/src/Functional/ResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/ResourceTestBase.php @@ -98,7 +98,7 @@ abstract class ResourceTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp() { + protected function setUp(): void { parent::setUp(); $this->serializer = $this->container->get('serializer'); diff --git a/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php index 5f371ccfde94a68c4953b8fcaf85c385c1b29436..dfc3595aa6d2eb3425d686bc5e6af737d404ccf3 100644 --- a/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php +++ b/core/modules/rest/tests/src/Functional/Views/RestExportAuthTest.php @@ -25,7 +25,7 @@ class RestExportAuthTest extends ViewTestBase { /** * {@inheritdoc} */ - public function setUp($import_test_views = TRUE): void { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->drupalLogin($this->drupalCreateUser(['administer views'])); diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php index 141a517b1f3e97cf43a8c9c52d0e822151d485f9..3da4471886b19f602aaf884537d505a2336bed34 100644 --- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php +++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php @@ -40,7 +40,7 @@ class RequestHandlerTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $serializer = $this->prophesize(SerializerInterface::class); $serializer->willImplement(DecoderInterface::class); diff --git a/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php b/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php index 7e7d554740fb288d919e9674ec1be56ab6fe1ab8..bba9f0c57a2a9a23a5b585f1e64336bac84673be 100644 --- a/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php +++ b/core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php @@ -26,7 +26,7 @@ abstract class NormalizerTestBase extends KernelTestBase { 'user', ]; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('entity_test_mulrev'); diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php index bdec9903dffc4e76cb5f608b2197694cd9da1640..6f657030b68ac8ff1c977304f198f6a8c50fdb21 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php @@ -47,7 +47,7 @@ abstract class ShortcutTestBase extends BrowserTestBase { */ protected $set; - protected function setUp() { + protected function setUp(): void { parent::setUp(); if ($this->profile != 'standard') { diff --git a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php index d55db184598b7119f74d300cb206d52caaccd2f6..ec430bbbc355d4d6685705cce7531b878b40e9f0 100644 --- a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php +++ b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php @@ -23,7 +23,7 @@ abstract class StatisticsTestBase extends BrowserTestBase { */ protected $blockingUser; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create Basic page node type. diff --git a/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php index 27fabf8ba61dd496fbc823a820e45f4251733ba2..5460c287dcb86e920fa48d00398b2b47a32b297d 100644 --- a/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php +++ b/core/modules/system/tests/src/Functional/Cache/PageCacheTagsTestBase.php @@ -20,7 +20,7 @@ abstract class PageCacheTagsTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Enable page caching. diff --git a/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php b/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php index 9193ee1032f6e51a201c62c3809e32306309d820..8176033ce5b1d8ef9298d15bbc4dbf918a0c24c6 100644 --- a/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php +++ b/core/modules/system/tests/src/Functional/Database/DatabaseTestBase.php @@ -18,7 +18,7 @@ abstract class DatabaseTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); DatabaseKernelTestBase::addSampleData(); diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php index 9c17f03c7ca8fd62bf90b5f4513801e7486d5609..34019fdddb25a886b62732c068541cce7d98e35c 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php @@ -50,7 +50,7 @@ abstract class EntityCacheTagsTestBase extends PageCacheTagsTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Give anonymous users permission to view test entities, so that we can diff --git a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php index 9917e6333f7578bc4dbc6783492f7ddd91396f30..64df50c21738d134292bbb88c8a2e5e7c168dd04 100644 --- a/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php +++ b/core/modules/system/tests/src/Functional/Module/ModuleTestBase.php @@ -24,7 +24,7 @@ abstract class ModuleTestBase extends BrowserTestBase { protected $adminUser; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->adminUser = $this->drupalCreateUser([ diff --git a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php index fa4d1456b9e22493362bf910bec0dd716a0561b8..4452c17740e1eabf1125cd7a64a6afc75e0a2898 100644 --- a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php +++ b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php @@ -44,7 +44,7 @@ class PrepareUninstallTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser(['administer modules']); diff --git a/core/modules/system/tests/src/Kernel/Render/ClassyTest.php b/core/modules/system/tests/src/Kernel/Render/ClassyTest.php index 8adb4ebd9808cc5ec0c4fa5e8d8c10eabbae8074..7d7a1d37ad807e8abf5a50c7935e0bc1a27b476f 100644 --- a/core/modules/system/tests/src/Kernel/Render/ClassyTest.php +++ b/core/modules/system/tests/src/Kernel/Render/ClassyTest.php @@ -19,7 +19,7 @@ class ClassyTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Use the classy theme. diff --git a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php index 10c30616da4f048a68d9262331afcaea66c45e3f..e5799de76b2b070ef0003dc2f676f371de7e531d 100644 --- a/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php +++ b/core/modules/system/tests/src/Kernel/Token/TokenReplaceKernelTestBase.php @@ -30,7 +30,7 @@ abstract class TokenReplaceKernelTestBase extends EntityKernelTestBase { */ protected static $modules = ['system']; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Install default system configuration. $this->installConfig(['system']); diff --git a/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php index bc1f4ee65dd031b90563142ca36d01b6b688f596..7371aa2a24414ed5ffd2861845020ea51292725c 100644 --- a/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php +++ b/core/modules/taxonomy/tests/src/Functional/TaxonomyTestBase.php @@ -24,7 +24,7 @@ abstract class TaxonomyTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->drupalPlaceBlock('system_breadcrumb_block'); diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php index 2f47bae8fb7245b7073bec5ae91a1a4fc726dbef..74b24df599aa235adc9757d634a0310f21521918 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyFieldFilterTest.php @@ -57,7 +57,7 @@ class TaxonomyFieldFilterTest extends ViewTestBase { */ public $termNames = []; - public function setUp($import_test_views = TRUE): void { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); // Add two new languages. diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php index 5a8c22cf5fa76ac614fb4a6b1ea5bc41f7d77157..083ee9e6c411eb2559bacd9c13ded205514c4007 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTestBase.php @@ -55,7 +55,7 @@ abstract class TaxonomyTestBase extends ViewTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->mockStandardInstall(); diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php index 2386bfb5d3e7e2e883981c090457c09d85ad4b31..b7fec2dec16a5e5fdd826f2ea16ad65b6a0f4064 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php @@ -31,7 +31,7 @@ class VocabularySerializationTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); Vocabulary::create(['vid' => 'test'])->save(); diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php index a2f902fb9e515f112f4cf0a548af2c1de9f4630a..e1f71f32beb6b1e1ded61e41b09211f49d4aa467 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php +++ b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyTestBase.php @@ -74,7 +74,7 @@ abstract class TaxonomyTestBase extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); // Install node config to create body field. diff --git a/core/modules/tour/tests/src/Functional/TourTestBasic.php b/core/modules/tour/tests/src/Functional/TourTestBasic.php index 2f4d9674dc8bd21504947efc115d996eb3e288f0..f0c9240bd574de026f9001f05f7039fb30270a5f 100644 --- a/core/modules/tour/tests/src/Functional/TourTestBasic.php +++ b/core/modules/tour/tests/src/Functional/TourTestBasic.php @@ -39,7 +39,7 @@ abstract class TourTestBasic extends TourTestBase { */ protected $permissions = ['access tour']; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Make sure we are using distinct default and administrative themes for diff --git a/core/modules/tour/tests/src/FunctionalJavascript/TourJavascriptTest.php b/core/modules/tour/tests/src/FunctionalJavascript/TourJavascriptTest.php index 64ccd4dde0ae0fa63e47dddacf00df89f757bed0..51494d25e3ed469a6f313cf7cb3c896cd302b03f 100644 --- a/core/modules/tour/tests/src/FunctionalJavascript/TourJavascriptTest.php +++ b/core/modules/tour/tests/src/FunctionalJavascript/TourJavascriptTest.php @@ -28,7 +28,7 @@ class TourJavascriptTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser([ diff --git a/core/modules/tour/tests/src/FunctionalJavascript/TourLegacyTest.php b/core/modules/tour/tests/src/FunctionalJavascript/TourLegacyTest.php index eefdc4d52c9de16d211e1f027e1abcf28163f0e7..6d781b894c6707139ee9deb7e90b44edb5782b8b 100644 --- a/core/modules/tour/tests/src/FunctionalJavascript/TourLegacyTest.php +++ b/core/modules/tour/tests/src/FunctionalJavascript/TourLegacyTest.php @@ -29,7 +29,7 @@ class TourLegacyTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser([ diff --git a/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php b/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php index 972495444d93e47a0a4557a2e01358887c0efcb7..d803bb3f3d948f870aea5224464d5e2329c5d6de 100644 --- a/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php +++ b/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php @@ -12,7 +12,7 @@ class UpdateUploaderTestBase extends UpdateTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Change the root path which Update Manager uses to install and update diff --git a/core/modules/user/tests/src/Functional/RestRegisterUserTest.php b/core/modules/user/tests/src/Functional/RestRegisterUserTest.php index 302944f924ed12822ff47c60f067dc0257c47a5f..25d92624972b3c3b144e5fa40d8c083d57ac4705 100644 --- a/core/modules/user/tests/src/Functional/RestRegisterUserTest.php +++ b/core/modules/user/tests/src/Functional/RestRegisterUserTest.php @@ -59,7 +59,7 @@ class RestRegisterUserTest extends ResourceTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $auth = isset(static::$auth) ? [static::$auth] : []; diff --git a/core/modules/user/tests/src/Functional/Views/AccessTestBase.php b/core/modules/user/tests/src/Functional/Views/AccessTestBase.php index 2f302af3736bb2c6ff0d0673b79d5a9cfc49cae6..93c6bfb1a7ebfda3a10be2f408d1d07896132062 100644 --- a/core/modules/user/tests/src/Functional/Views/AccessTestBase.php +++ b/core/modules/user/tests/src/Functional/Views/AccessTestBase.php @@ -45,7 +45,7 @@ abstract class AccessTestBase extends UserTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->drupalPlaceBlock('system_breadcrumb_block'); diff --git a/core/modules/user/tests/src/Functional/Views/UserTestBase.php b/core/modules/user/tests/src/Functional/Views/UserTestBase.php index 0760b1b43dd8836d4bc09a27a16a823bb33492e4..efc2a8ab1392524ae5e1df970bb144be2f622e3d 100644 --- a/core/modules/user/tests/src/Functional/Views/UserTestBase.php +++ b/core/modules/user/tests/src/Functional/Views/UserTestBase.php @@ -32,7 +32,7 @@ abstract class UserTestBase extends ViewTestBase { */ protected $nodes = []; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); ViewTestData::createTestViews(static::class, ['user_test_views']); diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php index fd6b057d2c2a706719bae27bd8bed7aca6f4f168..d6f5866d064a43158dbe0ad48afea230f3dd8fda 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/ProfileFieldCheckRequirementsTest.php @@ -15,7 +15,7 @@ class ProfileFieldCheckRequirementsTest extends MigrateDrupal6TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->sourceDatabase->schema()->dropTable('profile_fields'); } diff --git a/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php b/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php index 9d3c2d166c1a9bb8778565bfcfcb51c5bf7e8ee9..4bda849e95f96d1fb15395f9e48532826a185106 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d7/ProfileFieldCheckRequirementsTest.php @@ -15,7 +15,7 @@ class ProfileFieldCheckRequirementsTest extends MigrateDrupal7TestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->sourceDatabase->schema()->dropTable('profile_field'); } diff --git a/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php b/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php index 5180caa286f0e31643f29f37e31fa5d9a0ceda1b..80e625eee6bfc7f3ca37ba593b37afd1fdd12026 100644 --- a/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php +++ b/core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php @@ -38,7 +38,7 @@ abstract class UserKernelTestBase extends ViewsKernelTestBase { */ protected $userStorage; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp(); ViewTestData::createTestViews(static::class, ['user_test_views']); diff --git a/core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php b/core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php index 668fbd09ac678fe4115243bee2701cf53e5e5761..118835f1cc0e8d0b2e70970d7ab33aff3a39d2be 100644 --- a/core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php +++ b/core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php @@ -26,7 +26,7 @@ abstract class RoleUserTestBase extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->account = $this diff --git a/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php b/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php index 3f3f2abfd2535af5d2c968e001fb699f5c33861d..031a34526658c276d6f10edd536aa3f4be7bcb08 100644 --- a/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php @@ -48,7 +48,7 @@ class MonthDatePluginTest extends ViewTestBase { /** * {@inheritdoc} */ - public function setUp($import_test_views = TRUE): void { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $utc = new \DateTimeZone('UTC'); $format = 'Y-m-d h:i:s'; diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php index edabcb016605f673f3c32cc044803194ed6e0416..9550cfdceb8946d3f04a5d7bcca7233813cb018c 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php @@ -30,7 +30,7 @@ class ViewsBulkTest extends ViewTestBase { */ protected $defaultTheme = 'stark'; - public function setUp($import_test_views = TRUE): void { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->drupalCreateContentType(['type' => 'page']); diff --git a/core/modules/views/tests/src/Functional/ViewTestBase.php b/core/modules/views/tests/src/Functional/ViewTestBase.php index beebadba2fe5bbe002356d431dfa656414ea518e..30889ef254132217a3ea9a47431399566f2e4ad8 100644 --- a/core/modules/views/tests/src/Functional/ViewTestBase.php +++ b/core/modules/views/tests/src/Functional/ViewTestBase.php @@ -29,7 +29,7 @@ abstract class ViewTestBase extends BrowserTestBase { */ protected static $modules = ['views', 'views_test_config']; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp(); if ($import_test_views) { ViewTestData::createTestViews(static::class, ['views_test_config']); diff --git a/core/modules/views/tests/src/Functional/ViewTranslationTest.php b/core/modules/views/tests/src/Functional/ViewTranslationTest.php index 6e6cb88a8714a3a3b1c5595e2346016a8cd56f08..9df3ea7e1d2a145d3b8ae05f8567d3959724286e 100644 --- a/core/modules/views/tests/src/Functional/ViewTranslationTest.php +++ b/core/modules/views/tests/src/Functional/ViewTranslationTest.php @@ -31,7 +31,7 @@ class ViewTranslationTest extends ViewTestBase { /** * {@inheritdoc} */ - public function setUp($import_test_views = TRUE): void { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->enableViewsTestModule(); diff --git a/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php b/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php index bc1dd3243c447a1cb75247b7905f6cec4ffc61b9..41812b72b3cc77c8e5bd4a88ea6eb03d7b976169 100644 --- a/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php +++ b/core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php @@ -16,7 +16,7 @@ abstract class WizardTestBase extends ViewTestBase { */ protected static $modules = ['node', 'views_ui', 'block', 'rest']; - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); // Create and log in a user with administer views permission. diff --git a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php index 8a8e86410673cfc130bca1886b844dca451a33fe..27b399434dd945818153d71991a40bfc6cc5da4d 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php @@ -32,7 +32,7 @@ class BlockExposedFilterAJAXTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); ViewTestData::createTestViews(self::class, ['views_test_config']); $this->createContentType(['type' => 'page']); diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php index 6c515446ba5bc426a0afa6a70f3bdb91d6edc463..b963c8d58c270528cad55bf5065aa6e9d2a958a3 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php @@ -35,7 +35,7 @@ abstract class FieldFieldAccessTestBase extends ViewsKernelTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->installEntitySchema('user'); diff --git a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php index e3af4551378bb10beb7969bf32f67aad7e467c7d..3ab59f3c93f8f8aaf2b6abc92d8754af34acdd4d 100644 --- a/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php +++ b/core/modules/views/tests/src/Kernel/ViewsKernelTestBase.php @@ -44,7 +44,7 @@ abstract class ViewsKernelTestBase extends KernelTestBase { * to setup some additional stuff, like fields, you need to call false and * then call createTestViews for your own. */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp(); $this->installSchema('system', ['sequences']); 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 908597e757586ae67d5c60c063da8f81e76f496f..be5e30d8777ad3eac6f3539aa6e9524ea991505e 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 @@ -25,7 +25,7 @@ class MysqlDateSqlTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->database = $this->prophesize(Connection::class)->reveal(); } 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 2ea1f72fcae4e5b47f1c6d19fb63ec213e0aa04a..e1892b9612882adf6d8d6fa64b9e44c0d709eece 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 @@ -25,7 +25,7 @@ class PostgresqlDateSqlTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->database = $this->prophesize(Connection::class)->reveal(); } 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 d07f67cbe35f1b0cbb5cd2559e51a2d869378d95..3de9ba72fae39d55cfd1abc921d8ceb349882c02 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 @@ -25,7 +25,7 @@ class SqliteDateSqlTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->database = $this->prophesize(Connection::class)->reveal(); } diff --git a/core/modules/views_ui/tests/src/Functional/UITestBase.php b/core/modules/views_ui/tests/src/Functional/UITestBase.php index 784796eaa721580b84b0f2ce063cea344ec1a640..c15877fbf9b6cea95b8b767d0885541370370a83 100644 --- a/core/modules/views_ui/tests/src/Functional/UITestBase.php +++ b/core/modules/views_ui/tests/src/Functional/UITestBase.php @@ -33,7 +33,7 @@ abstract class UITestBase extends ViewTestBase { /** * {@inheritdoc} */ - protected function setUp($import_test_views = TRUE) { + protected function setUp($import_test_views = TRUE): void { parent::setUp($import_test_views); $this->enableViewsTestModule(); diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php index 197ef2c5c561a3667e26bf3f5c4180198c86eb4a..e73f25bb67c6107e58620faa13e8274ef4191ffe 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php @@ -38,7 +38,7 @@ class DisplayTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); ViewTestData::createTestViews(self::class, ['views_test_config']); diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php index 857dcf61f0145f448e69575c6a71ff833b4047e7..f1bc9e42e5c17d5d3895158932b8821c4d9b7419 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php @@ -24,7 +24,7 @@ class FilterCriteriaTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser([ diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php index ab58d5f0a2fc26b8156d83eff1d034d6d5fc4894..7a2b4c75e8e3ee03aff1d9d16e73985181e4c0d6 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php @@ -29,7 +29,7 @@ class FilterOptionsTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser([ diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php index 9ca8b80a65e2094a482a8deb4fbc6fe77bf6e838..0c41a2c6843f66cd139fc9a0b4bba14aa4f817b1 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php @@ -39,7 +39,7 @@ class PreviewTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); ViewTestData::createTestViews(self::class, ['views_test_config']); diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php index a0058d73b608d11432f71c6dadc89c994f04a2ae..5c04a00ba2bd078f279d2cdffb12c20b82f80335 100644 --- a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php +++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php @@ -52,7 +52,7 @@ class WorkspaceTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $permissions = [ 'access administration pages', diff --git a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php index 05cb76783bd27b0885466c9c0724df1c94a2f6fa..c5ca916621e155545d350fdde5ad25b2dfcd7617 100644 --- a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php +++ b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php @@ -145,7 +145,7 @@ abstract class BuildTestBase extends TestCase { /** * {@inheritdoc} */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::checkClassCommandRequirements(); } @@ -153,7 +153,7 @@ public static function setUpBeforeClass() { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); static::checkMethodCommandRequirements($this->getName()); $this->phpFinder = new PhpExecutableFinder(); @@ -169,7 +169,7 @@ protected function setUp() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); $this->stopServer(); diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php index 610c00dacafd689a4b7316ccc1fd92bea965056b..11451559f30650014cbfe3ae532e6db06a28f04a 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ThrobberTest.php @@ -30,7 +30,7 @@ class ThrobberTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $admin_user = $this->drupalCreateUser([ diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php index 20f04782735134cb24e1edea95f309af6f159184..7f92b9ed008fd591ca12b7b64bc5aee96d3c6e22 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php @@ -90,7 +90,7 @@ protected function initFrontPage() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { if ($this->mink) { $status = $this->getStatus(); if ($status === BaseTestRunner::STATUS_ERROR || $status === BaseTestRunner::STATUS_WARNING || $status === BaseTestRunner::STATUS_FAILURE) { diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php index 2d86844f048325b55f240ade41c6695ec207e96b..85a7e2a45d45ed52c3d031f6f51c02d3c180bb22 100644 --- a/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php @@ -52,7 +52,7 @@ abstract class ToolkitTestBase extends BrowserTestBase { */ protected $image; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Set the image factory service. diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php index a925fc468fb83665dfea6210e551a12994744d81..c8b8d9a8ec4f85f4cf22f6076c6de841669e0913 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php @@ -75,7 +75,7 @@ abstract class InstallerTestBase extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUpAppRoot(); $this->isInstalled = FALSE; diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php index fa0ba28ed7badf6d2c7935c7b86218284fe3fdb3..22b6aeabc73b551ac55078342a75248ebcf40604 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php @@ -125,7 +125,7 @@ abstract class UpdatePathTestBase extends BrowserTestBase { * then needed to set various things such as the config directories and the * container that would normally be done via the installer. */ - protected function setUp() { + protected function setUp(): void { parent::setUpAppRoot(); $this->zlibInstalled = function_exists('gzopen'); diff --git a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php index 147c898567585a3c7efc71742e20846aa13c9407..76cf0ecbdc6f10ed56d6af325b6db9753d9ae8f1 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php @@ -101,7 +101,7 @@ protected function getCacheBackend($bin = NULL) { return $this->cachebackends[$bin]; } - protected function setUp() { + protected function setUp(): void { $this->cachebackends = []; $this->defaultValue = $this->randomMachineName(10); @@ -110,7 +110,7 @@ protected function setUp() { $this->setUpCacheBackend(); } - protected function tearDown() { + protected function tearDown(): void { // Destruct the registered backend, each test will get a fresh instance, // properly emptying it here ensure that on persistent data backends they // will come up empty the next test. diff --git a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php index ce73c29bf3c7a894fd6aaec1e70b1df183b66a7a..774575688ae5df410207c6c1b6e93c724e34f439 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Database/DatabaseTestBase.php @@ -22,7 +22,7 @@ abstract class DatabaseTestBase extends KernelTestBase { */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = Database::getConnection(); $this->installSchema('database_test', [ diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php index daa74a9aacca373857e97a2d14b1e4b8b9a4ab59..a66fca14a820cbeeb495459cbb48ddfde634e8e3 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php @@ -28,7 +28,7 @@ class EntityAccessControlHandlerTest extends EntityLanguageTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('entity_test_no_uuid'); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php index d5300e932a909874a15323b325d5cf67a21593f0..1834972c73574c4a1659387639340d7ed76a3391 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php @@ -55,7 +55,7 @@ abstract class EntityKernelTestBase extends KernelTestBase { */ protected $state; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->entityTypeManager = $this->container->get('entity_type.manager'); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php index 10eca3f91e7c254c6d55f63ed575ee1af93b740b..52b364a19328e4975363eec4df9a12d4a73027f5 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php @@ -41,7 +41,7 @@ abstract class EntityLanguageTestBase extends EntityKernelTestBase { protected static $modules = ['language', 'entity_test']; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->languageManager = $this->container->get('language_manager'); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php index bd36cad7b0c3fa0783a1182eec05158d21c7fea8..c6f99a11e883f57ac1fa73462719b52ea0359303 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php @@ -48,7 +48,7 @@ class EntityRepositoryTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->entityTypeManager = $this->container->get('entity_type.manager'); diff --git a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php index ae15cde0cfd4543782e36e41b64b9eff3d18cead..9deac668af29a8dd8a36301ec55b2675a2b0687c 100644 --- a/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/File/FileTestBase.php @@ -35,7 +35,7 @@ abstract class FileTestBase extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // \Drupal\KernelTests\KernelTestBase::bootKernel() sets a global override // for the default scheme because core relies on it in diff --git a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php index 70a7d176282e9f53843447ed2a8329e60b13a751..43b999e93feddde0d61295e36e09518598190e00 100644 --- a/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php @@ -37,7 +37,7 @@ class StreamWrapperTest extends FileTestBase { */ protected $classname = 'Drupal\file_test\StreamWrapper\DummyStreamWrapper'; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); // Add file_private_path setting. diff --git a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php index 40add2f5529c99a6f5474049807b00b22e9ca5bd..a79e0232b1f71cac842abb53ccd78d0fd328deb9 100644 --- a/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php @@ -30,7 +30,7 @@ abstract class StorageTestBase extends KernelTestBase { */ protected $factory = 'keyvalue'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Define two data collections, diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php index 28b762ffcc328781a6ad2e11134ff22fa1e05408..bb2d4dd501fb547ab5021750408d963fffb388b4 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php @@ -32,7 +32,7 @@ class ContextAwarePluginBaseTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $configuration = [ 'context' => [ diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php index b5a7aeb2e7ffbce0aa558d051ba55e6e1b7ed20a..98df3076b7913c4d36f52d0fc6ba44234fa94c4a 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php @@ -45,7 +45,7 @@ class ContextAwarePluginTraitTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $plugin_definition = new TestContextAwarePluginDefinition(); $plugin_definition->addContextDefinition('nato_letter', ContextDefinition::create('string')); diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php index a8df05585ce5bcfb1b9ebdf78c0272dcc7e01f5d..46cf470ab984eb13799b09e64cded17f81c9bade 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php @@ -29,7 +29,7 @@ abstract class PluginTestBase extends KernelTestBase { protected $defaultsTestPluginManager; protected $defaultsTestPluginExpectedDefinitions; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Real modules implementing plugin types may expose a module-specific API diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php index 6e5269e7dbda286661b82fe86cd7a02eec4cf4b6..acff89197587377602215afd59c8826b4e5cd340 100644 --- a/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/TypedData/RecursiveContextualValidatorTest.php @@ -24,7 +24,7 @@ class RecursiveContextualValidatorTest extends KernelTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index 7c16534f50dbef6eb94555d444384c86ee49498c..a75d45758cc0347943dc98d3f7a5e69fa71efd0a 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -229,7 +229,7 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa /** * {@inheritdoc} */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); VarDumper::setHandler(TestVarDumper::class . '::cliHandler'); @@ -240,7 +240,7 @@ public static function setUpBeforeClass() { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Allow tests to compare MarkupInterface objects via assertEquals(). @@ -616,7 +616,7 @@ protected function getConfigSchemaExclusions() { /** * {@inheritdoc} */ - protected function assertPostConditions() { + protected function assertPostConditions(): void { // Execute registered Drupal shutdown functions prior to tearing down. // @see _drupal_shutdown_function() $callbacks = &drupal_register_shutdown_function(); @@ -636,7 +636,7 @@ protected function assertPostConditions() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { // Destroy the testing kernel. if (isset($this->kernel)) { $this->kernel->shutdown(); diff --git a/core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit8/ClassWriter.php b/core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit8/ClassWriter.php index da0854735726dee0da3e249176cb9559edcad3e4..dffce1d86395b04cfdd9727a6e698974d8f06021 100644 --- a/core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit8/ClassWriter.php +++ b/core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit8/ClassWriter.php @@ -83,11 +83,6 @@ private static function alterTestCase(ClassLoader $autoloader): void { $alteredCode = file_get_contents($alteredFile); $alteredCode = preg_replace('/abstract class TestCase[^\{]+\{/', '$0 ' . \PHP_EOL . " use \Symfony\Bridge\PhpUnit\Legacy\PolyfillTestCaseTrait;" . \PHP_EOL, $alteredCode, 1); $alteredCode = str_replace("__DIR__ . '/../Util/", "'$phpunit_dir/src/Util/", $alteredCode); - // While Drupal still allows methods in test base classes that inherit from - // TestCase with no void return typehints specified, we also alter TestCase - // to remove the typehints. - // @see https://www.drupal.org/project/drupal/issues/3182103 - $alteredCode = preg_replace('/^ ((?:protected|public)(?: static)? function \w+\(\)): void/m', ' $1', $alteredCode); include static::flushAlteredCodeToFile('TestCase.php', $alteredCode); } diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index d4703ed2c9c23e7260162d7d90f6f0e268a834f1..aad64ee4542c17af546baefaa24e4e090862d2a0 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -223,7 +223,7 @@ abstract class BrowserTestBase extends TestCase { /** * {@inheritdoc} */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); VarDumper::setHandler(TestVarDumper::class . '::cliHandler'); } @@ -363,7 +363,7 @@ protected function registerSessions() {} /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->setUpAppRoot(); @@ -443,7 +443,7 @@ protected function cleanupEnvironment() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); // Destroy the testing kernel. diff --git a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php index 9423fd26b350f0d4ea3ceb6f447bcd03f5507db4..8f0d3f945a82e9e33e4dad2eaa5c9113c0d7481d 100644 --- a/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php +++ b/core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php @@ -20,7 +20,7 @@ */ class DCOM58Test extends TestCase { - public function setUp(): void + protected function setUp(): void { // Some class named Entity in the global namespace. include __DIR__ .'/DCOM58Entity.php'; diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php index cd68de55a3a382cf43fcf219272e5f26efe8e24d..166ad9b57fddbfecfc5efcb261532347358b85fc 100644 --- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php +++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php @@ -37,7 +37,7 @@ abstract class MTimeProtectedFileStorageBase extends PhpStorageTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Random generator. diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php index cc0e79d0e0272915bbf3b145787412136b9812ca..007a6fa0cbd798aaaa34cac39dc726a5f04108eb 100644 --- a/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php +++ b/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php @@ -22,7 +22,7 @@ abstract class PhpStorageTestBase extends TestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); vfsStream::setup('exampleDir'); $this->directory = vfsStream::url('exampleDir'); diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php index f4f1d0ab14f05dbe4c9319831d319b4bdccd5292..baff425716394595f727eb2372c27ad06ebdfd7c 100644 --- a/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php +++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTest.php @@ -20,7 +20,7 @@ class YamlTest extends TestCase { */ protected $mockParser; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->mockParser = $this->getMockBuilder('\stdClass') ->addMethods(['encode', 'decode', 'getFileExtension']) @@ -28,7 +28,7 @@ public function setUp(): void { YamlParserProxy::setMock($this->mockParser); } - public function tearDown(): void { + protected function tearDown(): void { YamlParserProxy::setMock(NULL); parent::tearDown(); } diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php index 147bd98b53d685705a09601ff8141e5b78a9a004..5391087cf1c8087bc4d451f9f34b9feefbbd3dc2 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php @@ -301,7 +301,7 @@ public function createIsolatedComposerCacheDir() { /** * Calls 'tearDown' in any test that copies fixtures to transient locations. */ - public function tearDown(): void { + public function tearDown() { // Remove any temporary directories that were created. $filesystem = new Filesystem(); foreach ($this->tmpDirs as $dir) { diff --git a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php index 12d45b4fe454e4a4fbb748a1d7272268d7fbdc1f..0d63f9898c7eb4d0a5c0c3613bec5e18e5420645 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php @@ -22,7 +22,7 @@ class VendorHardeningPluginTest extends TestCase { use PhpUnitWarnings; use PhpUnitCompatibilityTrait; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); vfsStream::setup('vendor', NULL, [ 'drupal' => [ diff --git a/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php b/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php index 05e7a51cbcf19d913cd9ffdbbef078e1214fdf25..0ae737516eab7a164302a63570e802a56bd7958d 100644 --- a/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php @@ -45,7 +45,7 @@ class AssertLegacyTraitTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->page = $this->prophesize(DocumentElement::class); diff --git a/core/tests/Drupal/Tests/Core/Assert/WebAssertArgumentsTest.php b/core/tests/Drupal/Tests/Core/Assert/WebAssertArgumentsTest.php index bb5de5fc43ccd5c310501e43632437ca9e235559..1e2476514de83443dacb252cccb5894e48642c88 100644 --- a/core/tests/Drupal/Tests/Core/Assert/WebAssertArgumentsTest.php +++ b/core/tests/Drupal/Tests/Core/Assert/WebAssertArgumentsTest.php @@ -46,7 +46,7 @@ class WebAssertArgumentsTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->page = $this->prophesize(DocumentElement::class); diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php index b68332e34dd02bf2b8518d49907815abcc45f625..b23090b582b2a47a9cf62b7364569463253e083a 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php @@ -34,7 +34,7 @@ class SessionCacheContextTest extends UnitTestCase { */ protected $session; - public function setUp(): void { + protected function setUp(): void { $this->request = new Request(); $this->requestStack = new RequestStack(); diff --git a/core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php b/core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php index 067a2409d3e9716603674ed8b1804267da5df9c8..c203cae17d4b8e20118a41566ae7a0bc27b331b6 100644 --- a/core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php +++ b/core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php @@ -26,7 +26,7 @@ class GenerateThemeTest extends QuickStartTestBase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $php_executable_finder = new PhpExecutableFinder(); $this->php = $php_executable_finder->find(); diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php index ecd2a1a63695287c6d87db79f36c07ef88cdaee6..917179c83bd97d949711ad6404178c647d8bb916 100644 --- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php @@ -49,7 +49,7 @@ class QuickStartTest extends TestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $php_executable_finder = new PhpExecutableFinder(); $this->php = $php_executable_finder->find(); @@ -65,7 +65,7 @@ public function setUp(): void { /** * {@inheritdoc} */ - public function tearDown(): void { + protected function tearDown(): void { if ($this->testDb) { $test_site_directory = $this->root . DIRECTORY_SEPARATOR . $this->testDb->getTestSitePath(); if (file_exists($test_site_directory)) { diff --git a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php index 0b13da66f1fcaa4dc45323daef89c70d7b66103f..d6913c8a70565ec3eead2eeaa280010d971f6ff8 100644 --- a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/Driver/mysql/ConnectionTest.php @@ -30,7 +30,7 @@ class ConnectionTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { $this->pdoStatement = $this->prophesize(\PDOStatement::class); $this->pdoConnection = $this->prophesize(\PDO::class); } diff --git a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php b/core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php index ab64e21a4ebbc7c3ece33ac06f71ea589a080da4..d6ef38a27f4ad916e30f3f8af9c12ae38baab85d 100644 --- a/core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php +++ b/core/tests/Drupal/Tests/Core/Database/Driver/mysql/install/TasksTest.php @@ -24,7 +24,7 @@ class TasksTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { $this->connection = $this->prophesize(Connection::class); } diff --git a/core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php b/core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php index 980e715323ba58b7228ae3f4d465310c2daa45fe..fa26aec4f690713e6a5f0b535544f189bb82e1b5 100644 --- a/core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php +++ b/core/tests/Drupal/Tests/Core/Field/BaseFieldDefinitionTestBase.php @@ -23,7 +23,7 @@ abstract class BaseFieldDefinitionTestBase extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // getModuleAndPath() returns an array of the module name and directory. diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php index f8d2db7677f14b3d437d3a834291052fab471c68..114340c47217f406b46ba986e0bafce80ba621ba 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @@ -35,7 +35,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->decoratedFormState = $this->prophesize(FormStateInterface::class); diff --git a/core/tests/Drupal/Tests/Core/Form/FormTestBase.php b/core/tests/Drupal/Tests/Core/Form/FormTestBase.php index 222e5a6bcaa2e0b582d020b1865eaf9033313010..6e5c89c0d2dd0c4cd7609d5a532977b90e6a1b4c 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormTestBase.php +++ b/core/tests/Drupal/Tests/Core/Form/FormTestBase.php @@ -144,7 +144,7 @@ abstract class FormTestBase extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Add functions to the global namespace for testing. @@ -195,7 +195,7 @@ protected function setUp() { /** * {@inheritdoc} */ - protected function tearDown() { + protected function tearDown(): void { Html::resetSeenIds(); (new FormState())->clearErrors(); } diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php index c60db3312603445056790f07dd1f11b9120006b3..41500531c41e070087402866d65d069411b7fb49 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php @@ -40,7 +40,7 @@ abstract class LocalTaskIntegrationTestBase extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $container = new ContainerBuilder(); diff --git a/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php b/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php index 45132288d7ccaa78d13c11c0a099178336035e8a..a3dec70ad6ac2aabecdd89fc7f7b0b09622c9add 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php +++ b/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php @@ -43,7 +43,7 @@ abstract class LazyPluginCollectionTestBase extends UnitTestCase { 'apple' => ['id' => 'apple', 'key' => 'value'], ]; - protected function setUp() { + protected function setUp(): void { $this->pluginManager = $this->createMock('Drupal\Component\Plugin\PluginManagerInterface'); $this->pluginManager->expects($this->any()) ->method('getDefinitions') diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php index d667d1ddc8f5cf8c4e3d5808259bbaa047867c43..8f2a251b6151c3e3b873da16d726cca3c6d059cf 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php @@ -114,7 +114,7 @@ abstract class RendererTestBase extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controllerResolver = $this->createMock('Drupal\Core\Controller\ControllerResolverInterface'); diff --git a/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php b/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php index 162fed6eb2dde6c2b39f3f9f582157857ed614a3..2073865a46fe4876705d9e6b53f6d190d6d58996 100644 --- a/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php @@ -32,7 +32,7 @@ class LazyRouteCollectionTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->routeProvider = $this->createMock(RouteProviderInterface::class); $this->testRoutes = new \ArrayIterator([ diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php index 5852650fe8bd531472a17eec694e947ed5f382a3..764b47227eb179ac0d8ac7c388caa87dcdac468c 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php @@ -71,7 +71,7 @@ class TwigExtensionTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->renderer = $this->createMock('\Drupal\Core\Render\RendererInterface'); diff --git a/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php b/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php index cb653532010282f826ad6f96e7bfdc7ed64478a0..3f7f4f41417a68dcda3ef2e124ed6d5fc2e294ff 100644 --- a/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php @@ -40,7 +40,7 @@ class AjaxBasePageNegotiatorTest extends UnitTestCase { /** * {@inheritdoc} */ - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->tokenGenerator = $this->prophesize(CsrfTokenGenerator::class); diff --git a/core/tests/Drupal/Tests/Listeners/DrupalListener.php b/core/tests/Drupal/Tests/Listeners/DrupalListener.php index 0b288bce9622a8f31680645a296a5318db3d502c..758124cf8bbaf1d5bc7e513ff645b4e5d52ff9ff 100644 --- a/core/tests/Drupal/Tests/Listeners/DrupalListener.php +++ b/core/tests/Drupal/Tests/Listeners/DrupalListener.php @@ -28,21 +28,6 @@ class DrupalListener implements TestListener { use DrupalComponentTestListenerTrait; use DrupalStandardsListenerTrait; - /** - * A list of methods to be checked for void return typehint. - * - * @var string[] - */ - protected $methodsWithVoidReturn = [ - 'setUpBeforeClass', - 'setUp', - 'assertPreConditions', - 'assertPostConditions', - 'tearDown', - 'tearDownAfterClass', - 'onNotSuccessfulTest', - ]; - /** * The wrapped Symfony test listener. * @@ -88,21 +73,8 @@ public function startTest(Test $test): void { // that handles expected deprecations. $this->registerErrorHandler(); $this->symfonyListener->startTest($test); - // Check for missing void return typehints in concrete test classes' - // methods. If the method is inherited from a base test class, do - // nothing. - $class = new \ReflectionClass($test); - foreach ($this->methodsWithVoidReturn as $method) { - if ($class->hasMethod($method)) { - $reflected_method = $class->getMethod($method); - if ($reflected_method->getDeclaringClass()->getName() === get_class($test)) { - if (!$reflected_method->hasReturnType() || $reflected_method->getReturnType()->getName() !== 'void') { - @trigger_error("Declaring ::$method without a void return typehint in " . get_class($test) . " is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724", E_USER_DEPRECATED); - } - } - } - } // Check for incorrect visibility of the $modules property. + $class = new \ReflectionClass($test); if ($class->hasProperty('modules') && !$class->getProperty('modules')->isProtected()) { @trigger_error('The ' . get_class($test) . '::$modules property must be declared protected. See https://www.drupal.org/node/2909426', E_USER_DEPRECATED); } diff --git a/core/tests/Drupal/Tests/UnitTestCase.php b/core/tests/Drupal/Tests/UnitTestCase.php index fed556fe3d1eab4485670ea87c300631a02649a4..87a1fff781fae60f227f065839f88627c1f32c5a 100644 --- a/core/tests/Drupal/Tests/UnitTestCase.php +++ b/core/tests/Drupal/Tests/UnitTestCase.php @@ -46,7 +46,7 @@ abstract class UnitTestCase extends TestCase { /** * {@inheritdoc} */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); VarDumper::setHandler(TestVarDumper::class . '::cliHandler'); } @@ -54,7 +54,7 @@ public static function setUpBeforeClass() { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Ensure that an instantiated container in the global state of \Drupal from // a previous test does not leak into this test.