diff --git a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php index f26901fc7b826708dfa7b6c6e186946b06a9f4a1..199aac1c7fb215bf86da7ea0b722f8fd138acda2 100644 --- a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php +++ b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php @@ -61,6 +61,8 @@ class BlockConfigEntityUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeId = $this->randomMachineName(); $this->entityType = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface'); diff --git a/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php b/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php index 817c88bd5ae5ef46b978fbcf01e75b2732b71648..c4d83aaba9a4fa99064b8c9a1e10de5ce52e55b9 100644 --- a/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php +++ b/core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php @@ -24,6 +24,8 @@ class CategoryAutocompleteTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $block_manager = $this->createMock('Drupal\Core\Block\BlockManagerInterface'); $block_manager->expects($this->any()) ->method('getCategories') diff --git a/core/modules/book/tests/src/Unit/BookManagerTest.php b/core/modules/book/tests/src/Unit/BookManagerTest.php index 8634985c7d38348d2df7081906fbafa5c8ece9b1..ebb8ec976380879a8f92ed992d9dbd0bf6a11075 100644 --- a/core/modules/book/tests/src/Unit/BookManagerTest.php +++ b/core/modules/book/tests/src/Unit/BookManagerTest.php @@ -73,6 +73,8 @@ class BookManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->translation = $this->getStringTranslationStub(); $this->configFactory = $this->getConfigFactoryStub([]); diff --git a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php index c2525d45d50717eac0f8bf4f506ae01680571108..1b00a4ff026e5bba8aa25512fd2828da666382aa 100644 --- a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php +++ b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php @@ -69,6 +69,8 @@ class CommentLinkBuilderTest extends UnitTestCase { * Prepares mocks for the test. */ protected function setUp(): void { + parent::setUp(); + $this->commentManager = $this->createMock('\Drupal\comment\CommentManagerInterface'); $this->stringTranslation = $this->getStringTranslationStub(); $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); diff --git a/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php b/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php index 5a4e7638232f733609e4df34ca86dcdacc16929f..dc20d23361651bf3ebec7dc1b20dd052c82473df 100644 --- a/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php +++ b/core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php @@ -51,6 +51,8 @@ class CommentStatisticsUnitTest extends UnitTestCase { * Sets up required mocks and the CommentStatistics service under test. */ protected function setUp(): void { + parent::setUp(); + $this->statement = $this->getMockBuilder('Drupal\sqlite\Driver\Database\sqlite\Statement') ->disableOriginalConstructor() ->getMock(); diff --git a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php index ccae8e23b1dff755f611f94bd064e594de084dc6..ad2aa8894511f10a746a9b5aa388f5522433297f 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php @@ -60,6 +60,8 @@ class ConfigEntityMapperTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock('Drupal\Core\Entity\EntityTypeManagerInterface'); $this->entity = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityInterface'); diff --git a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php index 4c3a05ea95e0b545b4e30e52a82dc9d116016216..5e436db322085f7c377a76226a8015d391466a86 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php @@ -46,6 +46,8 @@ class ConfigFieldMapperTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock('Drupal\Core\Entity\EntityTypeManagerInterface'); $this->entity = $this->createMock('Drupal\field\FieldConfigInterface'); diff --git a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php index b91b61360319239a51b10628ca7ebcfdc461fd17..329647f2df1d0b7fd47a79e7cf6a4a315947c350 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php @@ -34,6 +34,8 @@ class ConfigMapperManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $language = new Language(['id' => 'en']); $language_manager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface'); $language_manager->expects($this->once()) diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php index 267a8bff576e81a86a5770b74fe975ba48e3da18..c9d8ff0de316e142fbf5f0d74814c5dcf002dfb7 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php @@ -99,6 +99,8 @@ class ConfigNamesMapperTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->routeProvider = $this->createMock('Drupal\Core\Routing\RouteProviderInterface'); $this->pluginDefinition = [ diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php index 6801ef7cf77a803d38eb03fb7303716d4f31649d..10ab1b0ca89dc25efceabda77790c2c8d2c6d9ec 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php @@ -29,6 +29,8 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */ $entity_type_manager = $this->createMock(EntityTypeManagerInterface::class); $this->routeSubscriber = new ContentModerationRouteSubscriber($entity_type_manager); diff --git a/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php b/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php index 89787633fa9ea6d4da673bdc091238f3c5eef854..13644b499c87c466cbd0fc0b31d0d7959135eac3 100644 --- a/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php +++ b/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php @@ -59,6 +59,8 @@ class EditorConfigEntityUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->editorId = $this->randomMachineName(); $this->entityTypeId = $this->randomMachineName(); diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php index 203c5d06ed01574e0e5c0975f5e4d47170250d0a..81c4e858d83ce492041a0aaa12d1f9f512390640 100644 --- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php +++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php @@ -27,6 +27,7 @@ class StandardTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); // Mock text format configuration entity object. $this->format = $this->getMockBuilder('\Drupal\filter\Entity\FilterFormat') diff --git a/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php index cb5e94cda3d556db370070a26353404cae23c325..3cab469051f59987da839fb0c94fd67dd181abbb 100644 --- a/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php +++ b/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php @@ -74,6 +74,8 @@ class FieldConfigEntityUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeId = $this->randomMachineName(); $this->entityType = $this->createMock('\Drupal\Core\Config\Entity\ConfigEntityTypeInterface'); diff --git a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php index 2b6cda81ecf87a7219b847efa95a8058487e93e8..f750e4c62f5beb6c454c9ae445014ce4e32cedc3 100644 --- a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php +++ b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php @@ -54,6 +54,8 @@ class FieldStorageConfigEntityUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->uuid = $this->createMock('\Drupal\Component\Uuid\UuidInterface'); $this->fieldTypeManager = $this->createMock(FieldTypePluginManagerInterface::class); diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php index c4ea7e25a5a7ed72f83946994ed5b8d000feee44..4f3a13f209bfccf060a246ef9612433062cfa57f 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php @@ -30,6 +30,8 @@ class FileFieldTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->plugin = new FileField([], 'file', []); $migration = $this->prophesize(MigrationInterface::class); diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php index 8da188a17171a468feaa1f4c112f44f2d62d66f2..37e27a23407251d7f1e215a9e75e9c12c047e462 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php @@ -30,6 +30,8 @@ class FileFieldTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->plugin = new FileField([], 'file', []); $migration = $this->prophesize(MigrationInterface::class); diff --git a/core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php b/core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php index 75981cfeef948996e42d493f515b6dcaee33189d..62e3334750e9a4b7ac4e2e18db864edeffa02739 100644 --- a/core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php +++ b/core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php @@ -33,6 +33,8 @@ class HelpTopicTwigLoaderTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->setUpVfs(); $this->helpLoader = new HelpTopicTwigLoader('\fake\root\path', $this->getHandlerMock('module'), diff --git a/core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php b/core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php index 8748bc709e8aac9a630f59f6a62e1ac2340ba43a..89478dbe1a68ebc49390ac36dca9c945b38f302a 100644 --- a/core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php +++ b/core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php @@ -45,6 +45,8 @@ class HelpTopicTwigTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->helpTopic = new HelpTopicTwig([], self::PLUGIN_INFORMATION['id'], self::PLUGIN_INFORMATION, diff --git a/core/modules/image/tests/src/Unit/ImageStyleTest.php b/core/modules/image/tests/src/Unit/ImageStyleTest.php index 6ea87730a2b28f456e6e04a3d70731f2018a5465..60fbbc76504a3f665cb74918fb9d4fa657880c91 100644 --- a/core/modules/image/tests/src/Unit/ImageStyleTest.php +++ b/core/modules/image/tests/src/Unit/ImageStyleTest.php @@ -77,6 +77,8 @@ protected function getImageStyleMock($image_effect_id, $image_effect, $stubs = [ * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeId = $this->randomMachineName(); $provider = $this->randomMachineName(); $this->entityType = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface'); diff --git a/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php b/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php index 1fd9679f043f7af8c06c0c470961d0fe251624d0..9e1fe476d99a1682a87663417b600d0de1f728d4 100644 --- a/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php +++ b/core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php @@ -46,6 +46,8 @@ class DenyPrivateImageStyleDownloadTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->routeMatch = $this->createMock('Drupal\Core\Routing\RouteMatchInterface'); $this->policy = new DenyPrivateImageStyleDownload($this->routeMatch); $this->response = new Response(); diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index 3d04433e3c0633c7fdd8bfb6e1728a18618a67e0..ce02961c66049503989c852d9214aa91b43d5dee 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -251,6 +251,8 @@ protected function tearDown(): void { if ($this->user2) { $this->user2->delete(); } + + parent::tearDown(); } /** diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index 9254a3829aa8b1cb6e00db2f6d1952a6ad499ccb..ee83fd93e361854478c0135d4fe272c9250adf6e 100644 --- a/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -35,6 +35,8 @@ class JsonApiDocumentTopLevelNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $resource_type_repository = $this->prophesize(ResourceTypeRepository::class); $resource_type_repository diff --git a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php index c546f6f1855ee08879e189afbf23511e1766bc42..be3ad9317de835d147b427a65be3534b5ba327cb 100644 --- a/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php @@ -45,6 +45,8 @@ class ResourceIdentifierNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $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/Unit/Config/LanguageConfigOverrideTest.php b/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php index 2f789cdc8f666b4342e859348b89cbf9ea53a738..4dcbcde301353015c7243931aaa9a79a0f20dc7f 100644 --- a/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php +++ b/core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php @@ -52,6 +52,8 @@ class LanguageConfigOverrideTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->storage = $this->createMock('Drupal\Core\Config\StorageInterface'); $this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface'); $this->typedConfig = $this->createMock('\Drupal\Core\Config\TypedConfigManagerInterface'); diff --git a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php index 636265bcf68808e4f2e490dba4ad31bcb9b2dd59..d13f94a6fba4d3d151b12c06d82ed8b7c2634307 100644 --- a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php +++ b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php @@ -61,6 +61,8 @@ class ContentLanguageSettingsUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeId = $this->randomMachineName(); $this->entityType = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface'); diff --git a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php index b135192323a0dc45c882c87b4569e628ad7302f0..a74f22abdacf97b237cc5fa78e1fe729b9aa072e 100644 --- a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php +++ b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php @@ -24,6 +24,7 @@ class LanguageNegotiationUrlTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); // Set up some languages to be used by the language-based path processor. $language_de = $this->createMock('\Drupal\Core\Language\LanguageInterface'); diff --git a/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php index 7fd44149abcbbb28324155ea63372e2ae5da5283..907a92e683a5f4dc2c1b32c1bce138f8244325dd 100644 --- a/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php +++ b/core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php @@ -46,6 +46,7 @@ class LanguageNegotiationContentEntityTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); // Set up some languages to be used by the language-based path processor. $language_de = $this->createMock(LanguageInterface::class); diff --git a/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php index efe1561a7082725924908446190a42c6e87b6669..1c1d88f20769924d958db9e9dfec74002beec2ee 100644 --- a/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php +++ b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php @@ -27,6 +27,8 @@ class LinkFieldTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->plugin = new LinkField([], 'link', []); $migration = $this->prophesize(MigrationInterface::class); diff --git a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php index 3421de836399f2e7656e132954479e2b15c42b2e..bcc09c250cfad6b8d87cc35a1ea4906f80682335 100644 --- a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php +++ b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php @@ -68,6 +68,8 @@ class LocaleLookupTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->storage = $this->createMock('Drupal\locale\StringStorageInterface'); $this->cache = $this->createMock('Drupal\Core\Cache\CacheBackendInterface'); $this->lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface'); diff --git a/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php b/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php index eec4bc730e27306d944cd913ac2981a126d32b20..a441b30fb7042987d6f5e3a2f82108079d6d0e0b 100644 --- a/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php +++ b/core/modules/locale/tests/src/Unit/LocaleTranslationTest.php @@ -53,6 +53,8 @@ class LocaleTranslationTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->storage = $this->createMock('Drupal\locale\StringStorageInterface'); $this->cache = $this->createMock('Drupal\Core\Cache\CacheBackendInterface'); $this->lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface'); diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php index f05ed19c782fe3e90830453c081c26a1c291ff1c..cf7cf0a9b848d4cd293ef6598d7211ce1c69ada8 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php @@ -59,6 +59,8 @@ class MigrateSqlIdMapTest extends MigrateTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->database = $this->getDatabase([]); } diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php index 87731aadb09d1d8a642dc319497d90478d267cf9..bc27bb0fc5b0ff636fffd2e4e4bb6bef3f5fa570 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php @@ -69,6 +69,8 @@ class Drupal6SqlBaseTest extends MigrateTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $plugin = 'placeholder_id'; /** @var \Drupal\Core\State\StateInterface $state */ $state = $this->createMock('Drupal\Core\State\StateInterface'); diff --git a/core/modules/mysql/tests/src/Unit/ConnectionTest.php b/core/modules/mysql/tests/src/Unit/ConnectionTest.php index 878d7672ada4b6cfb3d956c6f39a67bfffbbdc29..84200f8aaa0466defa414ab5afdc36b4acdc8323 100644 --- a/core/modules/mysql/tests/src/Unit/ConnectionTest.php +++ b/core/modules/mysql/tests/src/Unit/ConnectionTest.php @@ -32,6 +32,8 @@ class ConnectionTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->pdoStatement = $this->prophesize(\PDOStatement::class); $this->pdoConnection = $this->prophesize(\PDO::class); } diff --git a/core/modules/mysql/tests/src/Unit/InstallTasksTest.php b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php index f0cb3c88bfd2e3fdb52c61786eba1e3808cf5d81..b31bbf05f6fe97ef9ad23458aa8af0e895c7711a 100644 --- a/core/modules/mysql/tests/src/Unit/InstallTasksTest.php +++ b/core/modules/mysql/tests/src/Unit/InstallTasksTest.php @@ -25,6 +25,8 @@ class InstallTasksTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->connection = $this->prophesize(Connection::class); } diff --git a/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php b/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php index 674deab0b61b63158c9559d04db31dc3c5ae6734..7505dc3e1291aeb35d111eda5d9636f4df656607 100644 --- a/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php +++ b/core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php @@ -46,6 +46,8 @@ class DenyNodePreviewTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->routeMatch = $this->createMock('Drupal\Core\Routing\RouteMatchInterface'); $this->policy = new DenyNodePreview($this->routeMatch); $this->response = new Response(); diff --git a/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php b/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php index 43cbc5387ddcd8f9682b8992b3499252a60a6303..abbf8b5d7f970c3b07bf03c265410e8a2d722faa 100644 --- a/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php +++ b/core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php @@ -33,6 +33,8 @@ class AliasPathProcessorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->aliasManager = $this->createMock('Drupal\path_alias\AliasManagerInterface'); $this->pathProcessor = new AliasPathProcessor($this->aliasManager); } diff --git a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php index 0e6255f6050c7035e072d6240bc04704ba2652e0..685811cf20c398eb068223721303d3b714f4383e 100644 --- a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php +++ b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php @@ -39,6 +39,8 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityType = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface'); $this->entityType->expects($this->any()) ->method('getProvider') diff --git a/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php b/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php index 686129b5a661e7ceb60008a99fdaeb992e764af3..62d244534157507e2edb8a4ec8d4a251db88cdb8 100644 --- a/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php +++ b/core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php @@ -50,6 +50,8 @@ class SearchPageRepositoryTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->query = $this->createMock('Drupal\Core\Entity\Query\QueryInterface'); $this->storage = $this->createMock('Drupal\Core\Config\Entity\ConfigEntityStorageInterface'); diff --git a/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php b/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php index 0f2369bda5177ed916d05f0ea2f55190f174602a..aeddb24d5b5225efca1cf109ec619cd2df162896 100644 --- a/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php +++ b/core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php @@ -36,6 +36,8 @@ class SearchPluginCollectionTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->pluginManager = $this->createMock('Drupal\Component\Plugin\PluginManagerInterface'); $this->searchPluginCollection = new SearchPluginCollection($this->pluginManager, 'banana', ['id' => 'banana', 'color' => 'yellow'], 'fruit_stand'); } diff --git a/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php b/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php index 0c8c7df86342e63ef30687a08882ad7345bcb598..e6f9f7df0501e0640cbcf793756f29f136bb4e52 100644 --- a/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php +++ b/core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php @@ -37,6 +37,8 @@ class XmlEncoderTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->baseEncoder = $this->createMock(BaseXmlEncoder::class); $this->encoder = new XmlEncoder(); $this->encoder->setBaseEncoder($this->baseEncoder); diff --git a/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php b/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php index 7e85502c7f852e806caf486471af145fe97b5610..81ea03be5cae768b94e66b74220734d1f7bef441 100644 --- a/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php +++ b/core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php @@ -36,6 +36,8 @@ class ChainEntityResolverTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->testNormalizer = $this->createMock('Symfony\Component\Serializer\Normalizer\NormalizerInterface'); $this->testData = new \stdClass(); } diff --git a/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php b/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php index 0d6c0a1d36b3b4b35a012e12ad89302a52ab6254..73c89017366807b3ca44bbf98e317e32ab43bfc6 100644 --- a/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php +++ b/core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php @@ -30,6 +30,8 @@ class UuidResolverTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityRepository = $this->createMock(EntityRepositoryInterface::class); $this->resolver = new UuidResolver($this->entityRepository); diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php index 9329a981070e26f540c8560ea3be8aa948a1e599..876dca0a11f5b57670444e08f2b43ad564ad7805 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php @@ -38,6 +38,8 @@ class ComplexDataNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->normalizer = new ComplexDataNormalizer(); } diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php index 9daf730664300849413703751451156f6dfd2dcc..c96e29ab3004932b4133b2924c7f5367ddc7f88f 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php @@ -35,6 +35,8 @@ class ContentEntityNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $entity_field_manager = $this->createMock(EntityFieldManagerInterface::class); $entity_type_manager = $this->createMock(EntityTypeManagerInterface::class); $entity_type_repository = $this->createMock(EntityTypeRepositoryInterface::class); diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php index 45a017c4104e5d11f8b03b0682b3ead30fbea00c..67fa34e6015d175290983e6c6e2d6b8abc5391f7 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php @@ -57,6 +57,8 @@ class EntityNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityFieldManager = $this->createMock(EntityFieldManagerInterface::class); $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->entityTypeRepository = $this->createMock(EntityTypeRepositoryInterface::class); diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php index 459ad5da43a6b8c2a833b0545454f6e25a4c8902..95defa821cc90dfb657b2f70c2f0c030ee18f9fa 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php @@ -70,6 +70,8 @@ class EntityReferenceFieldItemNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityRepository = $this->prophesize(EntityRepositoryInterface::class); $this->normalizer = new EntityReferenceFieldItemNormalizer($this->entityRepository->reveal()); diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php index f57818f802a771db7ed40831912cb974d9ec2620..7db6e7ce37e4581d981f6e4f950c1a049d575162 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php @@ -47,6 +47,8 @@ class ListNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + // Mock the TypedDataManager to return a TypedDataInterface mock. $this->typedData = $this->createMock('Drupal\Core\TypedData\TypedDataInterface'); $typed_data_manager = $this->createMock(TypedDataManagerInterface::class); diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php index 5992a8c24a42c3f98c48293509f938de9a570c7f..cc7402041cf6295fd2a5fc936fb3ab1570a63cfe 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php @@ -29,6 +29,8 @@ class NullNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->normalizer = new NullNormalizer($this->interface); } diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php index a288a04ea28252475e3c100fad3d18b6e2a18d49..3218b28674ced41b3487f233b1ba1f0d713a952f 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php @@ -26,6 +26,8 @@ class PrimitiveDataNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->normalizer = new PrimitiveDataNormalizer(); } diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php index 142da8b97f56a7d205a9fe28a91b835734c135a6..92fbbb667a74665fc9d9cf14719c6e306d8c9018 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php @@ -29,6 +29,8 @@ class TypedDataNormalizerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->normalizer = new TypedDataNormalizer(); $this->typedData = $this->createMock('Drupal\Core\TypedData\TypedDataInterface'); } diff --git a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php index 580d29e856dce4c4e2cfd2e95bc5a9a4a1e62a5e..d31c9e61b096399519f07f0c2522411fefc1f6b5 100644 --- a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php +++ b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php @@ -27,6 +27,8 @@ class TaxonomyTermReferenceFieldTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->plugin = new TaxonomyTermReference([], 'taxonomy', []); $migration = $this->prophesize(MigrationInterface::class); diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php index aef1fd0477aee0c6d8c5c65e8d016129703fb3a2..9614da3ddaee0c87505ad1da202cab46245bb973 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php @@ -30,6 +30,8 @@ class TextFieldTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->plugin = new TextField([], 'text', []); $migration = $this->prophesize(MigrationInterface::class); diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php index 71adb4e59d12b39a842b7a595445e3f54c1462b6..64679992eec73a9e3277696a5fc5971efb0c7f17 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php @@ -21,6 +21,8 @@ class TextFieldTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->plugin = new TextField([], 'text', []); } diff --git a/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php b/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php index 279578bbb6be6e2943378f60eb725c5768ceb0d7..027613c8758ce1edd48135e25526e8a70f596757 100644 --- a/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php +++ b/core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php @@ -24,6 +24,8 @@ class AllowToolbarPathTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->policy = new AllowToolbarPath(); } diff --git a/core/modules/user/tests/src/Unit/UserAuthTest.php b/core/modules/user/tests/src/Unit/UserAuthTest.php index 336196b3dea8b32c32b5ed242efd6b1cf6eea010..1809d4985d0a715a830830c0ba2e4d2f68b45315 100644 --- a/core/modules/user/tests/src/Unit/UserAuthTest.php +++ b/core/modules/user/tests/src/Unit/UserAuthTest.php @@ -66,6 +66,8 @@ class UserAuthTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->userStorage = $this->createMock('Drupal\Core\Entity\EntityStorageInterface'); /** @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit\Framework\MockObject\MockObject $entity_type_manager */ diff --git a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php index d6b881851a32ed0e34ee787f028d5fb636194e35..a455b74257dd26cf861d6662927c1769ee2e2ba3 100644 --- a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php +++ b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php @@ -68,6 +68,8 @@ class ViewAjaxControllerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->viewStorage = $this->createMock('Drupal\Core\Entity\EntityStorageInterface'); $this->executableFactory = $this->getMockBuilder('Drupal\views\ViewExecutableFactory') ->disableOriginalConstructor() diff --git a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php index d2fa07832e60a1775c8ce746e557fdecc6869589..148da1c0aca6bc173e32b5a805a28b19070638c5 100644 --- a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php +++ b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php @@ -52,6 +52,8 @@ class RouteSubscriberTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->viewStorage = $this->getMockBuilder('Drupal\Core\Config\Entity\ConfigEntityStorage') ->disableOriginalConstructor() diff --git a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php index d875c01a02e3ccd85baaebbd8718ae82bb729e42..6ef6dee2e96fcdb9407b1fbedaf7771698bb3c0b 100644 --- a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php @@ -53,6 +53,8 @@ class ViewsLocalTaskTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->routeProvider = $this->createMock('Drupal\Core\Routing\RouteProviderInterface'); $this->state = $this->createMock('Drupal\Core\State\StateInterface'); $this->viewStorage = $this->createMock('Drupal\Core\Entity\EntityStorageInterface'); diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php index 5af77767b36b9ae3136f59de2b575cb72513f4d5..5296036685d05e6ccb19e6187117699a53b3dd93 100644 --- a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php @@ -28,6 +28,8 @@ class PagerPluginBaseTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->pager = $this->getMockBuilder('Drupal\views\Plugin\views\pager\PagerPluginBase') ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php index 99b65df3c33336fcf17ca8b3a70e3ce2b9f79c3d..b10019b5f29b80a4587df6b3be7fff346927e999 100644 --- a/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php @@ -35,6 +35,8 @@ class SqlBaseTest extends UnitTestCase { protected $display; protected function setUp(): void { + parent::setUp(); + $this->pager = $this->getMockBuilder('Drupal\views\Plugin\views\pager\SqlBase') ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php index 160a87eeff59c7eea5e9d3a4a2164c27df4c1d76..65aa5a2301089609351dbfde5137496d2048068e 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php @@ -48,6 +48,8 @@ class EntityOperationsUnitTest extends UnitTestCase { * @covers ::__construct */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class); $this->entityRepository = $this->createMock(EntityRepositoryInterface::class); $this->languageManager = $this->createMock('\Drupal\Core\Language\LanguageManagerInterface'); diff --git a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php index 9a7db01c1d0524f1002adb3ac59446d7a4e52f8a..935fd655b897049e62cb6291fab620c26d32705d 100644 --- a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php +++ b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php @@ -39,6 +39,8 @@ class ViewPageControllerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->pageController = new ViewPageController(); } diff --git a/core/modules/views/tests/src/Unit/ViewsDataTest.php b/core/modules/views/tests/src/Unit/ViewsDataTest.php index 0177af2b7ab2ebd2124daef59014da6d53e62aaf..12cf5ac764510036b7ca95d380aacbeb02771a33 100644 --- a/core/modules/views/tests/src/Unit/ViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/ViewsDataTest.php @@ -59,6 +59,8 @@ class ViewsDataTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->cacheTagsInvalidator = $this->createMock('Drupal\Core\Cache\CacheTagsInvalidatorInterface'); $this->cacheBackend = $this->createMock('Drupal\Core\Cache\CacheBackendInterface'); $this->getContainerWithCacheTagsInvalidator($this->cacheTagsInvalidator); diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index 14770f9b94eecc6f305c2fb03a7266fff5617799..b8001e601301a7a3efe1382ed8a147c6cf42f463 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -805,16 +805,6 @@ parameters: count: 3 path: modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/block/tests/src/Unit/CategoryAutocompleteTest.php - - message: "#^Variable \\$row in empty\\(\\) is never defined\\.$#" count: 1 @@ -885,11 +875,6 @@ parameters: count: 1 path: modules/book/src/Form/BookOutlineForm.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/book/tests/src/Unit/BookManagerTest.php - - message: "#^Function _add_ajax_listeners_to_plugin_inputs not found\\.$#" count: 2 @@ -995,16 +980,6 @@ parameters: count: 1 path: modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/comment/tests/src/Unit/CommentLinkBuilderTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php - - message: "#^Variable \\$data might not be defined\\.$#" count: 2 @@ -1040,26 +1015,6 @@ parameters: count: 1 path: modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php - - message: "#^Method Drupal\\\\contact\\\\ContactFormEditForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#" count: 1 @@ -1095,11 +1050,6 @@ parameters: count: 1 path: modules/content_moderation/src/ModerationInformation.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php - - message: "#^Variable \\$checkbox_id might not be defined\\.$#" count: 1 @@ -1210,16 +1160,6 @@ parameters: count: 1 path: modules/dblog/tests/src/Kernel/DbLogTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php - - message: "#^Relying on entity queries to check access by default is deprecated in drupal\\:9\\.2\\.0 and an error will be thrown from drupal\\:10\\.0\\.0\\. Call \\\\Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:accessCheck\\(\\) with TRUE or FALSE to specify whether access should be checked\\.$#" count: 2 @@ -1260,16 +1200,6 @@ parameters: count: 1 path: modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php - - message: "#^Variable \\$entity_display might not be defined\\.$#" count: 1 @@ -1390,16 +1320,6 @@ parameters: count: 2 path: modules/file/tests/src/Kernel/UsageTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php - - message: "#^Relying on entity queries to check access by default is deprecated in drupal\\:9\\.2\\.0 and an error will be thrown from drupal\\:10\\.0\\.0\\. Call \\\\Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:accessCheck\\(\\) with TRUE or FALSE to specify whether access should be checked\\.$#" count: 2 @@ -1420,16 +1340,6 @@ parameters: count: 1 path: modules/forum/src/ForumUninstallValidator.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php - - message: "#^Method Drupal\\\\history\\\\Plugin\\\\views\\\\field\\\\HistoryUserTimestamp\\:\\:render\\(\\) should return Drupal\\\\Component\\\\Render\\\\MarkupInterface\\|string but return statement is missing\\.$#" count: 1 @@ -1485,16 +1395,6 @@ parameters: count: 1 path: modules/image/tests/src/Functional/ImageStyleFlushTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/image/tests/src/Unit/ImageStyleTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php - - message: "#^Variable \\$reason in empty\\(\\) always exists and is not falsy\\.$#" count: 1 @@ -1540,26 +1440,11 @@ parameters: count: 2 path: modules/jsonapi/tests/src/Functional/ResourceTestBase.php - - - message: "#^Missing call to parent\\:\\:tearDown\\(\\) method\\.$#" - count: 1 - path: modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php - - message: "#^Variable \\$id in isset\\(\\) always exists and is not nullable\\.$#" count: 2 path: modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php - - message: "#^Method Drupal\\\\language\\\\Form\\\\LanguageAddForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#" count: 1 @@ -1585,26 +1470,6 @@ parameters: count: 1 path: modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php - - message: "#^Relying on entity queries to check access by default is deprecated in drupal\\:9\\.2\\.0 and an error will be thrown from drupal\\:10\\.0\\.0\\. Call \\\\Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:accessCheck\\(\\) with TRUE or FALSE to specify whether access should be checked\\.$#" count: 1 @@ -1620,11 +1485,6 @@ parameters: count: 1 path: modules/link/src/Plugin/migrate/process/FieldLink.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php - - message: "#^Function locale_config_batch_update_components\\(\\) should return array but return statement is missing\\.$#" count: 1 @@ -1700,16 +1560,6 @@ parameters: count: 2 path: modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/locale/tests/src/Unit/LocaleLookupTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/locale/tests/src/Unit/LocaleTranslationTest.php - - message: "#^Variable \\$error in empty\\(\\) always exists and is not falsy\\.$#" count: 1 @@ -1830,11 +1680,6 @@ parameters: count: 1 path: modules/migrate/tests/src/Kernel/MigrateTestBase.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php - - message: "#^Variable \\$sub_process_plugins might not be defined\\.$#" count: 2 @@ -1885,11 +1730,6 @@ parameters: count: 1 path: modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php - - message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#" count: 2 @@ -1965,16 +1805,6 @@ parameters: count: 1 path: modules/mysql/tests/src/Kernel/mysql/SchemaTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/mysql/tests/src/Unit/ConnectionTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/mysql/tests/src/Unit/InstallTasksTest.php - - message: "#^Relying on entity queries to check access by default is deprecated in drupal\\:9\\.2\\.0 and an error will be thrown from drupal\\:10\\.0\\.0\\. Call \\\\Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:accessCheck\\(\\) with TRUE or FALSE to specify whether access should be checked\\.$#" count: 2 @@ -2065,11 +1895,6 @@ parameters: count: 1 path: modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php - - message: "#^Method Drupal\\\\options\\\\Plugin\\\\Field\\\\FieldType\\\\ListFloatItem\\:\\:validateAllowedValue\\(\\) should return string but return statement is missing\\.$#" count: 1 @@ -2125,11 +1950,6 @@ parameters: count: 1 path: modules/path_alias/src/AliasManager.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php - - message: "#^Variable \\$table_field might not be defined\\.$#" count: 1 @@ -2150,11 +1970,6 @@ parameters: count: 1 path: modules/responsive_image/src/ResponsiveImageStyleForm.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php - - message: "#^Method Drupal\\\\rest\\\\Routing\\\\ResourceRoutes\\:\\:onDynamicRouteEvent\\(\\) should return array but return statement is missing\\.$#" count: 1 @@ -2210,16 +2025,6 @@ parameters: count: 2 path: modules/search/tests/src/Functional/SearchRankingTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/search/tests/src/Unit/SearchPageRepositoryTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/search/tests/src/Unit/SearchPluginCollectionTest.php - - message: "#^Call to an undefined method Drupal\\\\serialization\\\\Normalizer\\\\EntityNormalizer\\:\\:getCustomSerializedPropertyNames\\(\\)\\.$#" count: 1 @@ -2235,61 +2040,6 @@ parameters: count: 1 path: modules/serialization/src/Normalizer/FieldItemNormalizer.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php - - message: "#^Method Drupal\\\\shortcut\\\\Form\\\\SetCustomize\\:\\:save\\(\\) should return int but return statement is missing\\.$#" count: 1 @@ -2520,31 +2270,11 @@ parameters: count: 4 path: modules/taxonomy/tests/src/Kernel/TermKernelTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php - - message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#" count: 1 path: modules/toolbar/src/Controller/ToolbarController.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php - - message: "#^Method Drupal\\\\tour\\\\TipPluginBase\\:\\:get\\(\\) should return string but return statement is missing\\.$#" count: 1 @@ -2685,11 +2415,6 @@ parameters: count: 1 path: modules/user/tests/src/Unit/UserAccessControlHandlerTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/user/tests/src/Unit/UserAuthTest.php - - message: "#^Variable \\$batch in isset\\(\\) is never defined\\.$#" count: 1 @@ -3070,46 +2795,6 @@ parameters: count: 1 path: modules/views/tests/src/Kernel/ViewsTemplateTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: modules/views/tests/src/Unit/ViewsDataTest.php - - message: "#^Variable \\$relationship_handler in empty\\(\\) always exists and is not falsy\\.$#" count: 1 @@ -3425,11 +3110,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php - - message: "#^Constructor of class Drupal\\\\Tests\\\\Component\\\\Plugin\\\\Factory\\\\ArgumentsAllNull has an unused parameter \\$charismatic\\.$#" count: 1 @@ -3495,121 +3175,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Composer/ComposerTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php - - - - message: "#^Missing call to parent\\:\\:tearDown\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Annotation/TranslationTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/ConfigTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Config/StorageComparerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Controller/TitleResolverTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Database/DatabaseTest.php - - message: "#^Class Drupal\\\\Driver\\\\Database\\\\corefake\\\\Install\\\\Tasks not found\\.$#" count: 1 @@ -3620,146 +3185,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Database/InstallerObjectTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Database/OrderByTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/EntityUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Http/ClientFactoryTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Image/ImageTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Path/PathMatcherTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php - - message: "#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#" count: 1 @@ -3770,97 +3195,17 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php - - message: "#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\Discovery\\\\TestContainerDerivativeDiscovery has an unused parameter \\$example_service\\.$#" count: 1 path: tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php - - message: "#^Constructor of class Drupal\\\\Tests\\\\Core\\\\Plugin\\\\TestPluginManager has an unused parameter \\$namespaces\\.$#" count: 1 path: tests/Drupal/Tests/Core/Plugin/TestPluginManager.php - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Site/SettingsTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php - - message: "#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#" count: 1 path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php - - - - message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Utility/TokenTest.php diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php index 47cdc122e4aa6600a9c31f0a6f575d94b96425de..0623ceab339ca2555f1a0163017dd7af025d1da4 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php @@ -14,6 +14,8 @@ class PhpArrayContainerTest extends ContainerTest { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->machineFormat = FALSE; $this->containerClass = '\Drupal\Component\DependencyInjection\PhpArrayContainer'; $this->containerDefinition = $this->getMockContainerDefinition(); diff --git a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php index 9c755941da4ecbdb37e5b75f6e4a10c8c90d45a9..4f831bdceea682f28f8533ca6b92719360d684a3 100644 --- a/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php +++ b/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php @@ -52,6 +52,8 @@ class ComposerHookTest extends BuildTestBase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->fileSystem = new Filesystem(); $this->fixtures = new Fixtures(); $this->fixtures->createIsolatedComposerCacheDir(); @@ -66,6 +68,8 @@ protected function setUp(): void { protected function tearDown(): void { // Remove any temporary directories et. al. that were created. $this->fixtures->tearDown(); + + parent::tearDown(); } /** diff --git a/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php index ff804a2421275b648523f39ccd7499e4a0c81402..d32912f16a883f6654ed172f02cf461011521c4b 100644 --- a/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Access/CsrfAccessCheckTest.php @@ -39,6 +39,8 @@ class CsrfAccessCheckTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->csrfToken = $this->getMockBuilder('Drupal\Core\Access\CsrfTokenGenerator') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php b/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php index b76cbff4efbb32579f6f89069e4f65c1333b23ff..acabe3cbbdce6c8a76aa848b99f1ce1b5c6d1960 100644 --- a/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php +++ b/core/tests/Drupal/Tests/Core/Access/RouteProcessorCsrfTest.php @@ -32,6 +32,8 @@ class RouteProcessorCsrfTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->csrfToken = $this->getMockBuilder('Drupal\Core\Access\CsrfTokenGenerator') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php b/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php index 835e53daa2e164d8b63fe83f6cd60b70a2b00b81..18543f8ec65049eb4641134a3630bc27287308d8 100644 --- a/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php +++ b/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php @@ -26,6 +26,8 @@ class AjaxResponseTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->ajaxResponse = new AjaxResponse(); } diff --git a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php index 3f63032bc01bf5063ea929b40639b31815f6d426..21b52836ab781ee8274339012773dd6a9055babc 100644 --- a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php +++ b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php @@ -23,6 +23,8 @@ class TranslationTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->translationManager = $this->getStringTranslationStub(); } diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php index f380e385fcf9f5c7aa618258a5f5755dc098e00d..24f21b35b391a43d069ee7a0eee412e15b1cd0bd 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDependencyResolverTest.php @@ -53,6 +53,8 @@ class LibraryDependencyResolverTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->libraryDiscovery = $this->getMockBuilder('Drupal\Core\Asset\LibraryDiscovery') ->disableOriginalConstructor() ->onlyMethods(['getLibrariesByExtension']) diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php index 70c22d868196782b138b37321f3bd8ed55447393..fd96a0783b158e1dd07390b902d75802a765b2b8 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php @@ -87,6 +87,8 @@ class LibraryDiscoveryCollectorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->cache = $this->createMock('Drupal\Core\Cache\CacheBackendInterface'); $this->lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface'); $this->themeManager = $this->getMockBuilder('Drupal\Core\Theme\ThemeManagerInterface') diff --git a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php index b0e600c0b419b12e8999fa6836e4da1393bbd520..b6317841fea7090c2a1fe5815f351458820d2043 100644 --- a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php @@ -47,6 +47,8 @@ class BreadcrumbManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->moduleHandler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface'); $this->breadcrumbManager = new BreadcrumbManager($this->moduleHandler); $this->breadcrumb = new Breadcrumb(); diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php index 4debf2836a019a26d623f743b1170897431f0e31..d345763c6ea3186882a22a1bc77dde95417d420a 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php @@ -50,6 +50,8 @@ class CacheCollectorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->cacheBackend = $this->createMock('Drupal\Core\Cache\CacheBackendInterface'); $this->cacheTagsInvalidator = $this->createMock('Drupal\Core\Cache\CacheTagsInvalidatorInterface'); $this->lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface'); diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php index 50219f31d2f85b545a95295ba74c9cb2e12c684f..453843f63c9d4d45898261b58395473a76c2bd6c 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/SessionCacheContextTest.php @@ -38,6 +38,8 @@ class SessionCacheContextTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->request = new Request(); $this->requestStack = new RequestStack(); diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php index 21db97bb168977001a0303ace8d23c9b59cf71f6..ce57d2cbe4d1e6693520cc3f661d624a9fda81fd 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigFactoryTest.php @@ -52,6 +52,8 @@ class ConfigFactoryTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->storage = $this->createMock('Drupal\Core\Config\StorageInterface'); $this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface'); $this->typedConfig = $this->createMock('\Drupal\Core\Config\TypedConfigManagerInterface'); diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php index 3bfd0a4d9856f9be0b17d1621b8e05c5579f6f36..c75964465c13b9e849cb83213bafcc5f402d370f 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php @@ -58,6 +58,8 @@ class ConfigTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->storage = $this->createMock('Drupal\Core\Config\StorageInterface'); $this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface'); $this->typedConfig = $this->createMock('\Drupal\Core\Config\TypedConfigManagerInterface'); diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php index a3d57f5c8c059251756ef2aa76f5a7c920732474..80681d562ae8e6fdd8616bfb0264b76578112f30 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php @@ -115,6 +115,8 @@ class ConfigEntityBaseUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->id = $this->randomMachineName(); $values = [ 'id' => $this->id, diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php index b439b3db900479e0a66b945fdf28c71529a02d68..01a6f6acf3920584c08d6ced3cee1c249c61d2b9 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php @@ -25,6 +25,8 @@ class ConfigEntityTypeTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->typedConfigManager = $this->createMock(TypedConfigManagerInterface::class); $container = new ContainerBuilder(); $container->set('config.typed', $this->typedConfigManager); diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php index 0d411f915692466af28f53e01db534fd4e8924eb..e7ca0e53f50f6c1392b16cb18ed39692bc82a3fe 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php @@ -51,6 +51,8 @@ class EntityDisplayModeBaseUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityType = $this->randomMachineName(); $this->entityInfo = $this->createMock('\Drupal\Core\Entity\EntityTypeInterface'); diff --git a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php index 890fd383f085d8448ce962ac014fbbb1e74679a3..e26c61152c47d651cdbf6ba317e970541ba4e914 100644 --- a/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ReadOnlyStorageTest.php @@ -34,6 +34,8 @@ class ReadOnlyStorageTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + // Set up a memory storage we can manipulate to set fixtures. $this->memory = new MemoryStorage(); // Wrap the memory storage in the read-only storage to test it. diff --git a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php index f20d9f89b1095b823c6beba9c204a97d9ec33170..64fce17b2e0eff9e95690c0376170ed5697e7cbe 100644 --- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php +++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php @@ -42,6 +42,8 @@ class StorageComparerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->sourceStorage = $this->createMock('Drupal\Core\Config\StorageInterface'); $this->targetStorage = $this->createMock('Drupal\Core\Config\StorageInterface'); diff --git a/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php b/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php index 0378df8fa23122a76af999f83b9b17841d085a12..e9d9c00e0c1e5faaee29a2923825201084a23d40 100644 --- a/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php @@ -31,6 +31,8 @@ class AjaxRendererTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $element_info_manager = $this->createMock('Drupal\Core\Render\ElementInfoManagerInterface'); $element_info_manager->expects($this->any()) ->method('getInfo') diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php index 89c22fa21ddf2ea4208d1c27ee66e82df0d50dc1..59b0bbae5b3ee95a36f782fb0f7251fcd7ae3d69 100644 --- a/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/ControllerBaseTest.php @@ -22,6 +22,8 @@ class ControllerBaseTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->controllerBase = $this->getMockForAbstractClass('Drupal\Core\Controller\ControllerBase'); } diff --git a/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php index 76e6e87188adaaa1f2769cd29e272f0f1d97620c..db87502e9d346802eef51e2f7fb2268109218397 100644 --- a/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php @@ -52,6 +52,8 @@ class TitleResolverTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->controllerResolver = $this->createMock('\Drupal\Core\Controller\ControllerResolverInterface'); $this->translationManager = $this->createMock('\Drupal\Core\StringTranslation\TranslationInterface'); $this->argumentResolver = $this->createMock('\Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface'); diff --git a/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php b/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php index 1b41198fc05e024c20b000ca2742fb4c484d99ef..8205f338e6acf2362d9c371e146ce507833cc5d8 100644 --- a/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php +++ b/core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php @@ -27,6 +27,8 @@ class DatabaseEventsTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->connection = new StubConnection($this->createMock(StubPDO::class), []); } diff --git a/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php b/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php index bf61c2467c3ed31d991aeb1e544328c82a34e5e9..abff64ebee750a4c4497bd024161d3b376405bba 100644 --- a/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php +++ b/core/tests/Drupal/Tests/Core/Database/DatabaseTest.php @@ -35,6 +35,8 @@ class DatabaseTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->additionalClassloader = new ClassLoader(); $this->additionalClassloader->register(); // Mock the container so we don't need to mock drupal_valid_test_ua(). diff --git a/core/tests/Drupal/Tests/Core/Database/OrderByTest.php b/core/tests/Drupal/Tests/Core/Database/OrderByTest.php index 0e793429b158d6bbc326931fe497b11382084c4b..e2ee06a24cf0fd8f659995c1bfad682010f1fa02 100644 --- a/core/tests/Drupal/Tests/Core/Database/OrderByTest.php +++ b/core/tests/Drupal/Tests/Core/Database/OrderByTest.php @@ -25,6 +25,8 @@ class OrderByTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $mockPdo = $this->createMock(StubPDO::class); $connection = new StubConnection($mockPdo, []); $this->query = new Select($connection, 'test', NULL); diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php index 2d7b5505db008dd54069f2d9312d8f76737c270c..0f584772b44939b4a95b01489129917808cecdd9 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php @@ -30,6 +30,8 @@ class BackendCompilerPassTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->backendPass = new BackendCompilerPass(); } diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php index b651c168b28a8857e73341b8d0c88495e1c1ba67..bec9f692334e1d407c4ee59fbbb138b084ffbdcd 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php @@ -30,6 +30,8 @@ class StackedKernelPassTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->stackedKernelPass = new StackedKernelPass(); $this->containerBuilder = new ContainerBuilder(); } diff --git a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php index aae62e0e01442056835f0375766a420dedfd2f67..5b104a3aa2ecfe3e6d6d5a3234cfe9edf562fff5 100644 --- a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php @@ -35,6 +35,8 @@ class BaseFieldDefinitionTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + // Mock the field type manager and place it in the container. $field_type_manager = $this->createMock('Drupal\Core\Field\FieldTypePluginManagerInterface'); diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php index 6ac67ace217ad40d21f58ecb768e1773b92e8073..acc3bbea081f9f5681ab049c832c17ad764a3d59 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php @@ -127,6 +127,8 @@ class ContentEntityBaseUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->id = 1; $values = [ 'id' => $this->id, diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php index 38ac53d1b3494faea6368a395790db177f7804de..ad5d0984de2056c98e41ce22530d06bb68aaf64e 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php @@ -30,6 +30,8 @@ class EntityAccessCheckTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $cache_contexts_manager = $this->prophesize(CacheContextsManager::class)->reveal(); $container = new Container(); $container->set('cache_contexts_manager', $cache_contexts_manager); diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php index e01e0b57f5fdebd2ef202b7904b0b75277a2f0a3..4b218638c1420c76583457ffcd68bb69694959cf 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php @@ -56,6 +56,8 @@ class EntityResolverManagerTest extends UnitTestCase { * @covers ::__construct */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock('Drupal\Core\Entity\EntityTypeManagerInterface'); $this->container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface'); $this->classResolver = $this->getClassResolverStub(); diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php index 825a10b4600e9439eef19442d98cdddb777e95d6..e23eabea6c412359e8d372a8ed0451d2519e4368 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php @@ -87,6 +87,8 @@ class EntityUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->values = [ 'id' => 1, 'langcode' => 'en', diff --git a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php index 32d41ae984c8fdb1c78305cc4bbd43fb85988ed5..44e7f522fa54f9bfa4dae007e28d77711179a25a 100644 --- a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php @@ -51,6 +51,8 @@ class FieldDefinitionTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->fieldType = $this->randomMachineName(); $this->fieldTypeDefinition = [ 'id' => $this->fieldType, diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php index 02b2c7e0603d8c2ce473d7304134c6a0af2aba26..8d6e3fa6fd452fd1d54e3a7c578eaff694a43909 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @@ -77,6 +77,8 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityTypeManager = $this->createMock(EntityTypeManager::class); $this->entityFieldManager = $this->createMock(EntityFieldManager::class); $this->entityLastInstalledSchemaRepository = $this->createMock(EntityLastInstalledSchemaRepositoryInterface::class); diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index eb05f7a7e2598d5c89941f546c4e89a0d8d45bf1..731152881736cd79d61ff4083e09232233e282df 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -114,6 +114,8 @@ class SqlContentEntityStorageTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->entityType = $this->createMock('Drupal\Core\Entity\ContentEntityTypeInterface'); $this->entityType->expects($this->any()) ->method('id') diff --git a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php index d515a5be684f4f9f671f26c5538da06db0727b9e..f960b296b3822e07310bc110ab5bd6fba129ec8f 100644 --- a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php @@ -121,6 +121,8 @@ class EntityAdapterUnitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->id = 1; $values = [ 'id' => $this->id, diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php index 26df85f66c9dc83b78c3fa059162530f6dbe5db3..ea35df8665bd38ae7571671e7cb973cd197c85b5 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php @@ -82,6 +82,8 @@ class CustomPageExceptionHtmlSubscriberTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->configFactory = $this->getConfigFactoryStub(['system.site' => ['page.403' => '/access-denied-page', 'page.404' => '/not-found-page']]); $this->kernel = $this->createMock('Symfony\Component\HttpKernel\HttpKernelInterface'); diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php index 56a22f62b87b557b343aa257f1e2bf1acc939618..fe9b7203340f234527fe3f13cb1cea8ec7ac24be 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php @@ -25,6 +25,8 @@ class ModuleRouteSubscriberTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->moduleHandler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface'); $value_map = [ diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php index 4a5ff02d624d024d4c9811b28323e8f72fd18980..a330aaa17fa26afd129c2a7aadbe1cd4054a4668 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/PathRootsSubscriberTest.php @@ -32,6 +32,8 @@ class PathRootsSubscriberTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->state = $this->createMock('Drupal\Core\State\StateInterface'); $this->pathRootsSubscriber = new PathRootsSubscriber($this->state); } diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php index 0abce89cd52ab81bff7fabb8ee0081205cdf39e0..a67c61918b61c86c5b5dab4c4fe124a74d77ddfe 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php @@ -33,6 +33,8 @@ class PsrResponseSubscriberTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $factory = $this->getMockBuilder('Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php b/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php index 6be982db837b4fd004eeea7bcc3e097d895d436b..369e79e914935cac1613b60ef9367ef90fd7fedb 100644 --- a/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php +++ b/core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php @@ -23,6 +23,8 @@ class MemoryBackendTest extends UnitTestCase { protected $flood; protected function setUp(): void { + parent::setUp(); + $request = new RequestStack(); $request_mock = $this->getMockBuilder(Request::class) ->onlyMethods(['getClientIp']) diff --git a/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php b/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php index 4e98232d94261b03da31a9aca3da195947949b76..4dfcaf7441eb2c07ac0a4dd823a655cd242707c3 100644 --- a/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php @@ -23,6 +23,8 @@ class ClientFactoryTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $stack = $this->getMockBuilder('GuzzleHttp\HandlerStack') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Image/ImageTest.php b/core/tests/Drupal/Tests/Core/Image/ImageTest.php index 93b02ef197052c510709c5f5a8939a14271f4454..df0aa4cbecd8d7d3a9e8bdd30cbb81f863295887 100644 --- a/core/tests/Drupal/Tests/Core/Image/ImageTest.php +++ b/core/tests/Drupal/Tests/Core/Image/ImageTest.php @@ -47,6 +47,8 @@ class ImageTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + // Use the Druplicon image. $this->source = __DIR__ . '/../../../../../misc/druplicon.png'; } diff --git a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php index be95c518ad182a686b7e53b4568a2ea67eabe98b..25d0d204c17681431d04428ab9fd5c6d5983cb81 100644 --- a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php +++ b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php @@ -21,6 +21,8 @@ class LockBackendAbstractTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->lock = $this->getMockForAbstractClass('Drupal\Core\Lock\LockBackendAbstract'); } diff --git a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php index 3dea04ef27216fb0e16c45a0c9608c846ae02ae5..6a160314f985b6bb529ce4550e89b07abbb75866 100644 --- a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php @@ -66,6 +66,8 @@ class ContextualLinkManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $language_manager = $this->createMock(LanguageManagerInterface::class); $language_manager->expects($this->any()) ->method('getCurrentLanguage') diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php index 7238bbfbe8c1aca46f7e42e9fad3b17456a93a54..664f423f39d9880e2a25ae8340d8fdd9f818b4d6 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php @@ -107,6 +107,8 @@ class LocalActionManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->argumentResolver = $this->createMock('\Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface'); $this->request = $this->createMock('Symfony\Component\HttpFoundation\Request'); $this->routeProvider = $this->createMock('Drupal\Core\Routing\RouteProviderInterface'); diff --git a/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php b/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php index e264880118438fe3647204c5e3ba881d9dd8a985..69dfb6625fc470d2365a4c2b2f05e74486ddbbfb 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php @@ -31,6 +31,8 @@ class ChainRequestPolicyTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->policy = new ChainRequestPolicy(); $this->request = new Request(); } diff --git a/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php b/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php index 8ac38f68f98a7eff3fe35ed2fed6a9d286e1c3a1..571958865b4e07c02603491cf8b1d266806b6283 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php @@ -39,6 +39,8 @@ class ChainResponsePolicyTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->policy = new ChainResponsePolicy(); $this->response = new Response(); $this->request = new Request(); diff --git a/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php b/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php index 2d1d1b23e5ffd6e3aa12e54c6d8452449ba6ae45..2ae2e965e0a533f08e1f1e40112ad2a6f8a74111 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/CommandLineOrUnsafeMethodTest.php @@ -23,6 +23,8 @@ class CommandLineOrUnsafeMethodTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + // Note that it is necessary to partially mock the class under test in // order to disable the isCli-check. $this->policy = $this->getMockBuilder('Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod') diff --git a/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php b/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php index e2ee933e384fb0388c0c69a74b4f73174acd92ed..f863cd27621f476a0339835a84469127d3b87c46 100644 --- a/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php +++ b/core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php @@ -31,6 +31,8 @@ class NoSessionOpenTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->sessionConfiguration = $this->createMock('Drupal\Core\Session\SessionConfigurationInterface'); $this->policy = new NoSessionOpen($this->sessionConfiguration); } diff --git a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php index f844728f955d0612e1c88560e0d4dc817258d56c..02c3ef15a8c718d88b9234181c99cdc3a588a6e1 100644 --- a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php +++ b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php @@ -22,6 +22,8 @@ class PathMatcherTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + // Create a stub config factory with all config settings that will be // checked during this test. $config_factory_stub = $this->getConfigFactoryStub( diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php index 2737bd4015b6db3f4bd92fd261ee1107cf256851..08186df8fe746c73c254387fb11e17cfaa2ce4a3 100644 --- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php +++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php @@ -39,6 +39,7 @@ class PathProcessorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); // Set up some languages to be used by the language-based path processor. $languages = []; diff --git a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php index b7ad7110e42502a7009039b85582127fce82af9a..de59fcf442ec3fcc97f3b144540f092777d32dcf 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php @@ -30,6 +30,8 @@ class CategorizingPluginManagerTraitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface'); $module_handler->expects($this->any()) ->method('getModuleList') diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php index 37799cdfe4f769fc44eba19f725d83657db9e372..49369cc58b28703d3b6c340cd10567c4c66e9949 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php @@ -37,6 +37,8 @@ class DefaultPluginManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->expectedDefinitions = [ 'apple' => [ 'id' => 'apple', diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php index 8027421bcea580b731258e48690142e6056f33be..e3b45e77d06e30b7039fc5b69a6d804869af8c38 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php @@ -27,6 +27,8 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->discoveryMain = $discovery_main = $this->createMock('Drupal\Component\Plugin\Discovery\DiscoveryInterface'); } diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php index 0ac5cd7739f9a7a4ecaae535d11d2563da834335..5e3957a7f73d8d730e199eea155decf709985317 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/HookDiscoveryTest.php @@ -30,6 +30,8 @@ class HookDiscoveryTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->moduleHandler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface'); $this->hookDiscovery = new HookDiscovery($this->moduleHandler, 'test_plugin'); } diff --git a/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php b/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php index e96a2d864d51f87ba4a866aac62dd4c4efeaadb0..0b1468c459e15f29f3262af4cae05fb11bdb7b33 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php +++ b/core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php @@ -47,6 +47,8 @@ abstract class LazyPluginCollectionTestBase extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->pluginManager = $this->createMock('Drupal\Component\Plugin\PluginManagerInterface'); $this->pluginManager->expects($this->any()) ->method('getDefinitions') diff --git a/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php b/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php index 3d1bcc495877965f0fd5a82eca31eb667520fb97..0af99d38d08e43d11362a1339297129884b31bc6 100644 --- a/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php +++ b/core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php @@ -25,6 +25,8 @@ class RouteProcessorManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->processorManager = new RouteProcessorManager(); } diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php index a767a0eb4dacb44f52104f847e72d74f35961634..a9986d55069044f57195182551a832c4237b07ff 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php @@ -81,6 +81,8 @@ class RouteBuilderTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->dumper = $this->createMock('Drupal\Core\Routing\MatcherDumperInterface'); $this->lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface'); $this->dispatcher = $this->createMock('\Symfony\Contracts\EventDispatcher\EventDispatcherInterface'); diff --git a/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php b/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php index a5d75064eff88fa7d0d991f2a64d741ebaca3b0c..35c71a7cedb54fc5ee978e5c33bd3def71e81c7f 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php @@ -47,6 +47,8 @@ class RoutePreloaderTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->routeProvider = $this->createMock('Drupal\Core\Routing\PreloadableRouteProviderInterface'); $this->state = $this->createMock('\Drupal\Core\State\StateInterface'); $this->cache = $this->createMock('Drupal\Core\Cache\CacheBackendInterface'); diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php index aa099e73866157f94499722e12c3c2139e9e2ec7..23d39b0e2f046977692963c69f558b5fcbd198bb 100644 --- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php @@ -79,6 +79,8 @@ class UrlGeneratorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php index 5db4d7c9df403562b26b66a1463aeade0a04bab8..bcbdf5851d7900653b046afb1f9ddf39fd8cccf2 100644 --- a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php @@ -31,6 +31,8 @@ class WriteSafeSessionHandlerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->wrappedSessionHandler = $this->createMock('SessionHandlerInterface'); $this->sessionHandler = new WriteSafeSessionHandler($this->wrappedSessionHandler); } diff --git a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php index 6e06b8c1727b01b697d369563876e62a1a8f7b43..0737c5a81e543e99348691deb0b3c72dc0a36ab4 100644 --- a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php +++ b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php @@ -33,6 +33,8 @@ class SettingsTest extends UnitTestCase { * @covers ::__construct */ protected function setUp(): void { + parent::setUp(); + $this->config = [ 'one' => '1', 'two' => '2', diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php index 406c56079bc1a2f5bb2dc6cd9789990525a98f50..cbea48f0dd86a1c86e9353241aa8b9921d3eadd1 100644 --- a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php +++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php @@ -25,6 +25,8 @@ class ReverseProxyMiddlewareTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $responseMock = $this->createMock(Response::class); $this->mockHttpKernel = $this->createMock(HttpKernelInterface::class); $this->mockHttpKernel->method('handle') diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php index 14cf1c5979c89f5b0a92d2d57ed7d577626867a7..6e5b813ac02ce0e1729ea301da2513e8c13e0d56 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php @@ -33,6 +33,8 @@ class StringTranslationTraitTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->translation = $this->getObjectForTrait('\Drupal\Core\StringTranslation\StringTranslationTrait'); $mock = $this->prophesize(TranslationInterface::class); $mock->translate(Argument::cetera())->shouldNotBeCalled(); diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php index 3b98ab4d2f7c885d2b6a1e79e99b1797da9d599a..b2d8e7fac1012b7bcc0fde546b39340a49317f3d 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php @@ -28,6 +28,8 @@ class TranslationManagerTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->translationManager = new TestTranslationManager(); } diff --git a/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php b/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php index f0d372f10204e92184803933d41bd471e9e289e6..dd28938836efcf8e532164b906ba177be3a488ab 100644 --- a/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/ThemeNegotiatorTest.php @@ -47,6 +47,8 @@ class ThemeNegotiatorTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->themeAccessCheck = $this->getMockBuilder('\Drupal\Core\Theme\ThemeAccessCheck') ->disableOriginalConstructor() ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php index 3133d4491cbc28de8eda1b5ed3cc20756c7c99f0..d9c102f372a591c691ba0554a6770fd689baaf03 100644 --- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php @@ -77,6 +77,8 @@ class TokenTest extends UnitTestCase { * {@inheritdoc} */ protected function setUp(): void { + parent::setUp(); + $this->cache = $this->createMock('\Drupal\Core\Cache\CacheBackendInterface'); $this->languageManager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface');