summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules
diff options
context:
space:
mode:
authorDave Long <dave@longwaveconsulting.com>2023-04-16 22:50:09 +0100
committerDave Long <dave@longwaveconsulting.com>2023-04-16 22:50:09 +0100
commit596b3d38f138bcd3f26b0adb880eb4d78c5ff5f4 (patch)
tree1dcd7b2b81454f22f250c9a71103f56e336f111a /core/modules
parent3d86f4c43657c33097fac3a9ed5bfd741c3e2283 (diff)
downloaddrupal-596b3d38f138bcd3f26b0adb880eb4d78c5ff5f4.tar.gz
drupal-596b3d38f138bcd3f26b0adb880eb4d78c5ff5f4.zip
Issue #3351236 by Spokje, mondrake, smustgrave: Fix PHPStan L1 errors "Missing call to parent::setUp()/tearDown() method."
Diffstat (limited to 'core/modules')
-rw-r--r--core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php2
-rw-r--r--core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php2
-rw-r--r--core/modules/book/tests/src/Unit/BookManagerTest.php2
-rw-r--r--core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php2
-rw-r--r--core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php2
-rw-r--r--core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php2
-rw-r--r--core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php2
-rw-r--r--core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php2
-rw-r--r--core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php2
-rw-r--r--core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php2
-rw-r--r--core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php2
-rw-r--r--core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php1
-rw-r--r--core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php2
-rw-r--r--core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php2
-rw-r--r--core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php2
-rw-r--r--core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php2
-rw-r--r--core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php2
-rw-r--r--core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php2
-rw-r--r--core/modules/image/tests/src/Unit/ImageStyleTest.php2
-rw-r--r--core/modules/image/tests/src/Unit/PageCache/DenyPrivateImageStyleDownloadTest.php2
-rw-r--r--core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php2
-rw-r--r--core/modules/jsonapi/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php2
-rw-r--r--core/modules/jsonapi/tests/src/Unit/Normalizer/ResourceIdentifierNormalizerTest.php2
-rw-r--r--core/modules/language/tests/src/Unit/Config/LanguageConfigOverrideTest.php2
-rw-r--r--core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php2
-rw-r--r--core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php1
-rw-r--r--core/modules/language/tests/src/Unit/Plugin/LanguageNegotiation/LanguageNegotiationContentEntityTest.php1
-rw-r--r--core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php2
-rw-r--r--core/modules/locale/tests/src/Unit/LocaleLookupTest.php2
-rw-r--r--core/modules/locale/tests/src/Unit/LocaleTranslationTest.php2
-rw-r--r--core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php2
-rw-r--r--core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php2
-rw-r--r--core/modules/mysql/tests/src/Unit/ConnectionTest.php2
-rw-r--r--core/modules/mysql/tests/src/Unit/InstallTasksTest.php2
-rw-r--r--core/modules/node/tests/src/Unit/PageCache/DenyNodePreviewTest.php2
-rw-r--r--core/modules/path_alias/tests/src/Unit/PathProcessor/AliasPathProcessorTest.php2
-rw-r--r--core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php2
-rw-r--r--core/modules/search/tests/src/Unit/SearchPageRepositoryTest.php2
-rw-r--r--core/modules/search/tests/src/Unit/SearchPluginCollectionTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Encoder/XmlEncoderTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/NullNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php2
-rw-r--r--core/modules/serialization/tests/src/Unit/Normalizer/TypedDataNormalizerTest.php2
-rw-r--r--core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php2
-rw-r--r--core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php2
-rw-r--r--core/modules/text/tests/src/Unit/Plugin/migrate/field/d7/TextFieldTest.php2
-rw-r--r--core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php2
-rw-r--r--core/modules/user/tests/src/Unit/UserAuthTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/Plugin/pager/SqlBaseTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php2
-rw-r--r--core/modules/views/tests/src/Unit/ViewsDataTest.php2
63 files changed, 123 insertions, 0 deletions
diff --git a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
index f26901fc7b8..199aac1c7fb 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 817c88bd5ae..c4d83aaba9a 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 8634985c7d3..ebb8ec97638 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 c2525d45d50..1b00a4ff026 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 5a4e7638232..dc20d233616 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 ccae8e23b1d..ad2aa889451 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 4c3a05ea95e..5e436db3220 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 b91b6136031..329647f2df1 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 267a8bff576..c9d8ff0de31 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 6801ef7cf77..10ab1b0ca89 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 89787633fa9..13644b499c8 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 203c5d06ed0..81c4e858d83 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 cb5e94cda3d..3cab469051f 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 2b6cda81ecf..f750e4c62f5 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 c4ea7e25a5a..4f3a13f209b 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 8da188a1717..37e27a23407 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 75981cfeef9..62e3334750e 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 8748bc709e8..89478dbe1a6 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 6ea87730a2b..60fbbc76504 100644
--- a/core/modules/image/tests/src/Unit/ImageStyleTest.php
+++ b/core/modules/image/tests/src/Unit/ImageStyleTest.php
@@ -77,6 +77,8 @@ class ImageStyleTest extends UnitTestCase {
* {@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 1fd9679f043..9e1fe476d99 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 3d04433e3c0..ce02961c660 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 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase {
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 9254a3829aa..ee83fd93e36 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 c546f6f1855..be3ad9317de 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 2f789cdc8f6..4dcbcde3013 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 636265bcf68..d13f94a6fba 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 b135192323a..a74f22abdac 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 7fd44149abc..907a92e683a 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 efe1561a708..1c1d88f2076 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 3421de83639..bcc09c250cf 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 eec4bc730e2..a441b30fb70 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 f05ed19c782..cf7cf0a9b84 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 87731aadb09..bc27bb0fc5b 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 878d7672ada..84200f8aaa0 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 f0cb3c88bfd..b31bbf05f6f 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 674deab0b61..7505dc3e129 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 43cbc5387dd..abbf8b5d7f9 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 0e6255f6050..685811cf20c 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 686129b5a66..62d24453415 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 0f2369bda51..aeddb24d5b5 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 0c8c7df8634..e6f9f7df050 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 7e85502c7f8..81ea03be5ca 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 0d6c0a1d36b..73c89017366 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 9329a981070..876dca0a11f 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 9daf7306643..c96e29ab300 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 45a017c4104..67fa34e6015 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 459ad5da43a..95defa821cc 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 f57818f802a..7db6e7ce37e 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 5992a8c24a4..cc7402041cf 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 a288a04ea28..3218b28674c 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 142da8b97f5..92fbbb667a7 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 580d29e856d..d31c9e61b09 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 aef1fd0477a..9614da3ddae 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 71adb4e59d1..64679992eec 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 279578bbb6b..027613c8758 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 336196b3dea..1809d4985d0 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 d6b881851a3..a455b74257d 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 d2fa07832e6..148da1c0aca 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 d875c01a02e..6ef6dee2e96 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 5af77767b36..5296036685d 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 99b65df3c33..b10019b5f29 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 160a87eeff5..65aa5a23010 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 9a7db01c1d0..935fd655b89 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 0177af2b7ab..12cf5ac7645 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);