From f9c1ff235b9cb9936cb056d512653554c2ff1a91 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 12 Aug 2014 00:40:02 -0700 Subject: [PATCH] Issue #2314123 by sun: Fixed various tests. --- .../block/src/Tests/BlockConfigSchemaTest.php | 2 + .../src/Tests/CKEditorPluginManagerTest.php | 3 +- .../ckeditor/src/Tests/CKEditorTest.php | 3 +- .../CommentDefaultFormatterCacheTagsTest.php | 2 +- .../src/Tests/CommentStringIdEntitiesTest.php | 2 + .../config/src/Tests/ConfigEntityUnitTest.php | 3 + .../src/Tests/Storage/CachedStorageTest.php | 3 +- .../Tests/Storage/ConfigStorageTestBase.php | 5 ++ .../src/Tests/Storage/FileStorageTest.php | 2 +- .../src/Tests/Views/ViewsIntegrationTest.php | 3 +- .../editor/src/Tests/EditorManagerTest.php | 3 +- .../src/Tests/QuickEditIntegrationTest.php | 8 ++- .../entity/src/Tests/EntityDisplayTest.php | 7 +- .../src/Tests/EntityFormDisplayTest.php | 6 +- .../field/src/Tests/Email/EmailItemTest.php | 7 -- .../Tests/FieldImportDeleteUninstallTest.php | 2 +- core/modules/file/src/Tests/ValidatorTest.php | 11 ++++ .../hal/src/Tests/NormalizerTestBase.php | 2 +- .../node/src/Tests/NodeLastChangedTest.php | 2 +- .../src/Tests/MetadataGeneratorTest.php | 7 +- core/modules/rdf/src/Tests/CrudTest.php | 15 +++++ .../src/Tests/Field/EmailFieldRdfaTest.php | 2 +- .../Field/FieldRdfaDatatypeCallbackTest.php | 6 +- .../rdf/src/Tests/Field/FieldRdfaTestBase.php | 7 +- .../src/Tests/Block/SystemMenuBlockTest.php | 2 +- .../src/Tests/Cache/ApcuBackendUnitTest.php | 9 +-- .../Cache/GenericCacheBackendUnitTestBase.php | 2 +- .../src/Tests/Database/SelectComplexTest.php | 4 +- .../DrupalKernel/DrupalKernelSiteTest.php | 2 +- .../Tests/Entity/ConfigEntityQueryTest.php | 9 ++- .../Entity/EntityAccessControlHandlerTest.php | 2 +- .../Tests/Entity/EntityBundleFieldTest.php | 7 -- .../src/Tests/Entity/EntityCrudHookTest.php | 1 - .../src/Tests/Entity/EntityFieldTest.php | 19 +++++- .../Tests/Entity/EntityLanguageTestBase.php | 7 ++ .../src/Tests/Entity/EntityQueryTest.php | 4 +- .../src/Tests/Entity/EntityValidationTest.php | 15 +++++ .../src/Tests/Entity/FieldSqlStorageTest.php | 10 +++ .../src/Tests/Extension/ModuleHandlerTest.php | 5 ++ .../src/Tests/Extension/ThemeHandlerTest.php | 2 +- .../system/src/Tests/File/NameMungingTest.php | 16 +++++ .../src/Tests/File/ScanDirectoryTest.php | 5 ++ .../system/src/Tests/Form/FormCacheTest.php | 15 +++++ .../src/Tests/Path/PathUnitTestBase.php | 5 ++ .../system/src/Tests/System/ScriptTest.php | 5 ++ .../src/Tests/TypedData/TypedDataTest.php | 4 +- .../src/Tests/Formatter/TextFormatterTest.php | 1 - .../src/Tests/Formatter/TextPlainUnitTest.php | 65 +++++++++++++++++++ .../src/Tests/UserAccountFormFieldsTest.php | 1 + .../Tests/Entity/RowEntityRenderersTest.php | 2 +- .../Tests/Plugin/RelationshipJoinTestBase.php | 5 ++ .../views/src/Tests/Plugin/RowEntityTest.php | 2 +- .../views/src/Tests/ViewExecutableTest.php | 2 +- .../views/src/Tests/ViewStorageTest.php | 1 - .../Tests/Wizard/WizardPluginBaseUnitTest.php | 4 +- 55 files changed, 265 insertions(+), 81 deletions(-) diff --git a/core/modules/block/src/Tests/BlockConfigSchemaTest.php b/core/modules/block/src/Tests/BlockConfigSchemaTest.php index 2be1a6db60..6cae8e15f0 100644 --- a/core/modules/block/src/Tests/BlockConfigSchemaTest.php +++ b/core/modules/block/src/Tests/BlockConfigSchemaTest.php @@ -32,6 +32,8 @@ class BlockConfigSchemaTest extends KernelTestBase { 'forum', 'node', 'statistics', + // BlockManager->getModuleName() calls system_get_info(). + 'system', 'taxonomy', ); diff --git a/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php b/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php index f84f73e2a7..3a5a07054d 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php @@ -22,7 +22,7 @@ class CKEditorPluginManagerTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('system', 'editor', 'ckeditor'); + public static $modules = array('system', 'user', 'filter', 'editor', 'ckeditor'); /** * The manager for "CKEditor plugin" plugins. @@ -36,7 +36,6 @@ function setUp() { // Install the Filter module. $this->installSchema('system', 'url_alias'); - $this->enableModules(array('user', 'filter')); // Create text format, associate CKEditor. $filtered_html_format = entity_create('filter_format', array( diff --git a/core/modules/ckeditor/src/Tests/CKEditorTest.php b/core/modules/ckeditor/src/Tests/CKEditorTest.php index 41b81b8b3e..a80db68d13 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorTest.php @@ -23,7 +23,7 @@ class CKEditorTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('system', 'editor', 'ckeditor', 'filter_test'); + public static $modules = array('system', 'user', 'filter', 'editor', 'ckeditor', 'filter_test'); /** * An instance of the "CKEditor" text editor plugin. @@ -44,7 +44,6 @@ function setUp() { // Install the Filter module. $this->installSchema('system', 'url_alias'); - $this->enableModules(array('user', 'filter')); // Create text format, associate CKEditor. $filtered_html_format = entity_create('filter_format', array( diff --git a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php index 787631b864..3c809c4eb5 100644 --- a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php +++ b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php @@ -24,7 +24,7 @@ class CommentDefaultFormatterCacheTagsTest extends EntityUnitTestBase { * * @var array */ - public static $modules = array('entity_test', 'comment', 'menu_link'); + public static $modules = array('entity_test', 'comment'); /** * {@inheritdoc} diff --git a/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php b/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php index a65aed0bd6..b71b02f614 100644 --- a/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php +++ b/core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php @@ -29,6 +29,8 @@ class CommentStringIdEntitiesTest extends KernelTestBase { 'field_ui', 'entity', 'entity_test', + // EMAIL_MAX_LENGTH constant. + 'system', 'text', ); diff --git a/core/modules/config/src/Tests/ConfigEntityUnitTest.php b/core/modules/config/src/Tests/ConfigEntityUnitTest.php index 984583e712..b9daa6cd02 100644 --- a/core/modules/config/src/Tests/ConfigEntityUnitTest.php +++ b/core/modules/config/src/Tests/ConfigEntityUnitTest.php @@ -71,6 +71,9 @@ public function testStorageMethods() { // Ensure that the configuration entity can be loaded by UUID. $entity_loaded_by_uuid = entity_load_by_uuid($entity_type->id(), $entity->uuid()); + if (!$entity_loaded_by_uuid) { + $this->fail(sprintf("Failed to load '%s' entity ID '%s' by UUID '%s'.", $entity_type->id(), $entity->id(), $entity->uuid())); + } // Compare UUIDs as the objects are not identical since // $entity->enforceIsNew is FALSE and $entity_loaded_by_uuid->enforceIsNew // is NULL. diff --git a/core/modules/config/src/Tests/Storage/CachedStorageTest.php b/core/modules/config/src/Tests/Storage/CachedStorageTest.php index bd02b7d592..72beb6a2f2 100644 --- a/core/modules/config/src/Tests/Storage/CachedStorageTest.php +++ b/core/modules/config/src/Tests/Storage/CachedStorageTest.php @@ -11,6 +11,7 @@ use Drupal\Core\Config\CachedStorage; use Drupal\Core\Database\Database; use Drupal\Core\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; /** * Tests CachedStorage operations. @@ -89,7 +90,7 @@ public function containerBuild(ContainerBuilder $container) { parent::containerBuild($container); // Use the regular database cache backend to aid testing. $container->register('cache_factory', 'Drupal\Core\Cache\DatabaseBackendFactory') - ->addArgument(Database::getConnection()); + ->addArgument(new Reference('database')); } } diff --git a/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php index 2bc48fa628..e3c4e76e1d 100644 --- a/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php +++ b/core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php @@ -28,6 +28,11 @@ abstract class ConfigStorageTestBase extends DrupalUnitTestBase { */ protected $storage; + /** + * @var \Drupal\Core\Config\StorageInterface; + */ + protected $invalidStorage; + /** * Tests storage CRUD operations. * diff --git a/core/modules/config/src/Tests/Storage/FileStorageTest.php b/core/modules/config/src/Tests/Storage/FileStorageTest.php index 4aadad515d..6165044da5 100644 --- a/core/modules/config/src/Tests/Storage/FileStorageTest.php +++ b/core/modules/config/src/Tests/Storage/FileStorageTest.php @@ -46,7 +46,7 @@ protected function delete($name) { /** * Tests the FileStorage::listAll method with a relative and absolute path. */ - protected function testlistAll() { + public function testlistAll() { $expected_files = array( 'core.extension', 'system.performance', diff --git a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php index f771f3d5d6..89f7cf0525 100644 --- a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php +++ b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php @@ -32,7 +32,7 @@ class ViewsIntegrationTest extends ViewUnitTestBase { * * @var array */ - public static $modules = array('dblog_test_views'); + public static $modules = array('dblog', 'dblog_test_views'); /** * {@inheritdoc} @@ -40,7 +40,6 @@ class ViewsIntegrationTest extends ViewUnitTestBase { protected function setUp() { parent::setUp(); - $this->enableModules(array('system', 'dblog')); $this->installSchema('dblog', array('watchdog')); ViewTestData::createTestViews(get_class($this), array('dblog_test_views')); diff --git a/core/modules/editor/src/Tests/EditorManagerTest.php b/core/modules/editor/src/Tests/EditorManagerTest.php index 55f37da153..9e071d9021 100644 --- a/core/modules/editor/src/Tests/EditorManagerTest.php +++ b/core/modules/editor/src/Tests/EditorManagerTest.php @@ -22,7 +22,7 @@ class EditorManagerTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('system', 'editor'); + public static $modules = array('system', 'user', 'filter', 'editor'); /** * The manager for text editor plugins. @@ -36,7 +36,6 @@ public function setUp() { // Install the Filter module. $this->installSchema('system', 'url_alias'); - $this->enableModules(array('user', 'filter')); // Add text formats. $filtered_html_format = entity_create('filter_format', array( diff --git a/core/modules/editor/src/Tests/QuickEditIntegrationTest.php b/core/modules/editor/src/Tests/QuickEditIntegrationTest.php index a8f81e286c..73494f67ec 100644 --- a/core/modules/editor/src/Tests/QuickEditIntegrationTest.php +++ b/core/modules/editor/src/Tests/QuickEditIntegrationTest.php @@ -24,6 +24,11 @@ */ class QuickEditIntegrationTest extends QuickEditTestBase { + /** + * {@inheritdoc} + */ + public static $modules = array('editor', 'editor_test'); + /** * The manager for editor plug-ins. * @@ -65,9 +70,6 @@ public function setUp() { // Install the Filter module. $this->installSchema('system', 'url_alias'); - // Enable the Text Editor and Text Editor Test module. - $this->enableModules(array('editor', 'editor_test')); - // Create a field. $this->field_name = 'field_textarea'; $this->createFieldWithInstance( diff --git a/core/modules/entity/src/Tests/EntityDisplayTest.php b/core/modules/entity/src/Tests/EntityDisplayTest.php index 1e6d05d907..1efa671fac 100644 --- a/core/modules/entity/src/Tests/EntityDisplayTest.php +++ b/core/modules/entity/src/Tests/EntityDisplayTest.php @@ -16,7 +16,7 @@ */ class EntityDisplayTest extends DrupalUnitTestBase { - public static $modules = array('entity', 'field', 'entity_test', 'user', 'text', 'entity_test'); + public static $modules = array('entity', 'field', 'entity_test', 'user', 'text', 'field_test', 'node', 'system'); protected function setUp() { parent::setUp(); @@ -137,8 +137,6 @@ public function testExtraFieldComponent() { * Tests the behavior of a field component within an entity display object. */ public function testFieldComponent() { - $this->enableModules(array('field_test')); - $field_name = 'test_field'; // Create a field storage and an instance. $field_storage = entity_create('field_storage_config', array( @@ -264,7 +262,6 @@ public function testBaseFieldComponent() { * Tests renaming and deleting a bundle. */ public function testRenameDeleteBundle() { - $this->enableModules(array('field_test', 'node', 'system', 'text')); $this->installEntitySchema('node'); // Create a node bundle, display and form display object. @@ -314,8 +311,6 @@ public function testRenameDeleteBundle() { * Tests deleting field instance. */ public function testDeleteFieldInstance() { - $this->enableModules(array('field_test')); - $field_name = 'test_field'; // Create a field storage and an instance. $field_storage = entity_create('field_storage_config', array( diff --git a/core/modules/entity/src/Tests/EntityFormDisplayTest.php b/core/modules/entity/src/Tests/EntityFormDisplayTest.php index ee7eb9d084..eaaec9a07f 100644 --- a/core/modules/entity/src/Tests/EntityFormDisplayTest.php +++ b/core/modules/entity/src/Tests/EntityFormDisplayTest.php @@ -16,7 +16,7 @@ */ class EntityFormDisplayTest extends DrupalUnitTestBase { - public static $modules = array('entity', 'field', 'entity_test', 'user', 'text'); + public static $modules = array('entity', 'field', 'entity_test', 'field_test', 'user', 'text'); protected function setUp() { parent::setUp(); @@ -47,8 +47,6 @@ public function testEntityGetFromDisplay() { * Tests the behavior of a field component within an EntityFormDisplay object. */ public function testFieldComponent() { - $this->enableModules(array('field_test')); - // Create a field storage and an instance. $field_name = 'test_field'; $field_storage = entity_create('field_storage_config', array( @@ -177,8 +175,6 @@ public function testBaseFieldComponent() { * Tests deleting field instance. */ public function testDeleteFieldInstance() { - $this->enableModules(array('field_sql_storage', 'field_test')); - $field_name = 'test_field'; // Create a field storage and an instance. $field_storage = entity_create('field_storage_config', array( diff --git a/core/modules/field/src/Tests/Email/EmailItemTest.php b/core/modules/field/src/Tests/Email/EmailItemTest.php index 20bb137516..237749c614 100644 --- a/core/modules/field/src/Tests/Email/EmailItemTest.php +++ b/core/modules/field/src/Tests/Email/EmailItemTest.php @@ -18,13 +18,6 @@ */ class EmailItemTest extends FieldUnitTestBase { - /** - * Modules to enable. - * - * @var array - */ - public static $modules = array('email'); - public function setUp() { parent::setUp(); diff --git a/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php b/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php index c26d912ea8..6584ec158a 100644 --- a/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php +++ b/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php @@ -22,7 +22,7 @@ class FieldImportDeleteUninstallTest extends FieldUnitTestBase { * * @var array */ - public static $modules = array('telephone', 'menu_link'); + public static $modules = array('telephone'); public function setUp() { parent::setUp(); diff --git a/core/modules/file/src/Tests/ValidatorTest.php b/core/modules/file/src/Tests/ValidatorTest.php index 4f81f0843d..6176225edc 100644 --- a/core/modules/file/src/Tests/ValidatorTest.php +++ b/core/modules/file/src/Tests/ValidatorTest.php @@ -13,6 +13,17 @@ * @group file */ class ValidatorTest extends FileManagedUnitTestBase { + + /** + * @var \Drupal\file\Entity\File + */ + protected $image; + + /** + * @var \Drupal\file\Entity\File + */ + protected $non_image; + function setUp() { parent::setUp(); diff --git a/core/modules/hal/src/Tests/NormalizerTestBase.php b/core/modules/hal/src/Tests/NormalizerTestBase.php index 2ebff7468d..b5bb3487ed 100644 --- a/core/modules/hal/src/Tests/NormalizerTestBase.php +++ b/core/modules/hal/src/Tests/NormalizerTestBase.php @@ -33,7 +33,7 @@ abstract class NormalizerTestBase extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('entity', 'entity_test', 'entity_reference', 'field', 'hal', 'language', 'rest', 'serialization', 'system', 'text', 'user', 'filter', 'menu_link'); + public static $modules = array('entity', 'entity_test', 'entity_reference', 'field', 'hal', 'language', 'rest', 'serialization', 'system', 'text', 'user', 'filter'); /** * The mock serializer. diff --git a/core/modules/node/src/Tests/NodeLastChangedTest.php b/core/modules/node/src/Tests/NodeLastChangedTest.php index 5160ad0ef9..37d3bcc66b 100644 --- a/core/modules/node/src/Tests/NodeLastChangedTest.php +++ b/core/modules/node/src/Tests/NodeLastChangedTest.php @@ -21,7 +21,7 @@ class NodeLastChangedTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('entity', 'user', 'node', 'field', 'text', 'filter'); + public static $modules = array('entity', 'user', 'node', 'field', 'system', 'text', 'filter'); public function setUp() { parent::setUp(); diff --git a/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php b/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php index f665071f36..bf1df1475f 100644 --- a/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php +++ b/core/modules/quickedit/src/Tests/MetadataGeneratorTest.php @@ -20,6 +20,11 @@ */ class MetadataGeneratorTest extends QuickEditTestBase { + /** + * {@inheritdoc} + */ + public static $modules = array('quickedit_test'); + /** * The manager for editor plugins. * @@ -124,8 +129,6 @@ public function testSimpleEntityType() { public function testEditorWithCustomMetadata() { $this->installSchema('system', 'url_alias'); - // Enable edit_test module so that the WYSIWYG editor becomes available. - $this->enableModules(array('quickedit_test')); $this->editorManager = $this->container->get('plugin.manager.quickedit.editor'); $this->editorSelector = new EditorSelector($this->editorManager, $this->container->get('plugin.manager.field.formatter')); $this->metadataGenerator = new MetadataGenerator($this->accessChecker, $this->editorSelector, $this->editorManager); diff --git a/core/modules/rdf/src/Tests/CrudTest.php b/core/modules/rdf/src/Tests/CrudTest.php index 772ec4fa6a..e97a73c7ee 100644 --- a/core/modules/rdf/src/Tests/CrudTest.php +++ b/core/modules/rdf/src/Tests/CrudTest.php @@ -23,6 +23,21 @@ class CrudTest extends DrupalUnitTestBase { */ public static $modules = array('entity_test', 'rdf', 'system'); + /** + * @var string + */ + protected $prefix; + + /** + * @var string + */ + protected $entity_type; + + /** + * @var string + */ + protected $bundle; + public function setUp() { parent::setUp(); $this->prefix = 'rdf.mapping'; diff --git a/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php b/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php index 7eb8d3313d..623a626537 100644 --- a/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php +++ b/core/modules/rdf/src/Tests/Field/EmailFieldRdfaTest.php @@ -23,7 +23,7 @@ class EmailFieldRdfaTest extends FieldRdfaTestBase { /** * {@inheritdoc} */ - public static $modules = array('email', 'text'); + public static $modules = array('text'); public function setUp() { parent::setUp(); diff --git a/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php b/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php index 7dc6c74514..6b4dc12ab6 100644 --- a/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php +++ b/core/modules/rdf/src/Tests/Field/FieldRdfaDatatypeCallbackTest.php @@ -38,9 +38,9 @@ public function setUp() { ))->save(); // Set up test values. - $this->test_value = $this->randomMachineName(); + $this->testValue = $this->randomMachineName(); $this->entity = entity_create('entity_test'); - $this->entity->{$this->fieldName}->value = $this->test_value; + $this->entity->{$this->fieldName}->value = $this->testValue; $this->entity->save(); $this->uri = $this->getAbsoluteUri($this->entity); @@ -51,7 +51,7 @@ public function setUp() { */ public function testDefaultFormatter() { // Expected value is the output of the datatype callback, not the raw value. - $this->assertFormatterRdfa(array('type'=>'text_default'), 'http://schema.org/interactionCount', array('value' => 'foo' . $this->test_value)); + $this->assertFormatterRdfa(array('type'=>'text_default'), 'http://schema.org/interactionCount', array('value' => 'foo' . $this->testValue)); } } diff --git a/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php b/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php index 9a26acadac..e0502c7384 100644 --- a/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php +++ b/core/modules/rdf/src/Tests/Field/FieldRdfaTestBase.php @@ -50,7 +50,12 @@ abstract class FieldRdfaTestBase extends FieldUnitTestBase { * * @var array */ - public static $modules = array('rdf', 'menu_link'); + public static $modules = array('rdf'); + + /** + * @var string + */ + protected $testValue; /** * {@inheritdoc} diff --git a/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php b/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php index 95a4258bcd..80c3d3dc1f 100644 --- a/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php +++ b/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php @@ -24,7 +24,7 @@ class SystemMenuBlockTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('system', 'menu_link', 'block'); + public static $modules = array('system', 'block'); /** * Tests calculation of a system menu block's configuration dependencies. diff --git a/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php b/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php index 134de2cae6..51745017cf 100644 --- a/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php +++ b/core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php @@ -13,6 +13,7 @@ * Tests the APCu cache backend. * * @group Cache + * @requires extension apc */ class ApcuBackendUnitTest extends GenericCacheBackendUnitTestBase { @@ -33,14 +34,14 @@ protected function checkRequirements() { } protected function createCacheBackend($bin) { - $this->backend = new ApcuBackend($bin, $this->databasePrefix); - return $this->backend; + return new ApcuBackend($bin, $this->databasePrefix); } public function tearDown() { - $this->backend->removeBin(); + foreach ($this->cachebackends as $bin => $cachebackend) { + $this->cachebackends[$bin]->removeBin(); + } parent::tearDown(); - $this->backend = NULL; } } diff --git a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php index a949b3542c..debff49fa1 100644 --- a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php +++ b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php @@ -94,7 +94,7 @@ public function tearDownCacheBackend() { * @return \Drupal\Core\Cache\CacheBackendInterface * Cache backend to test. */ - final function getCacheBackend($bin = null) { + protected function getCacheBackend($bin = null) { if (!isset($bin)) { $bin = $this->getTestBin(); } diff --git a/core/modules/system/src/Tests/Database/SelectComplexTest.php b/core/modules/system/src/Tests/Database/SelectComplexTest.php index 7932816e81..f63d84daaa 100644 --- a/core/modules/system/src/Tests/Database/SelectComplexTest.php +++ b/core/modules/system/src/Tests/Database/SelectComplexTest.php @@ -21,7 +21,7 @@ class SelectComplexTest extends DatabaseTestBase { * * @var array */ - public static $modules = array('node_access_test', 'field'); + public static $modules = array('system', 'user', 'node_access_test', 'field'); /** * Tests simple JOIN statements. @@ -322,9 +322,7 @@ function testJoinTwice() { * Tests that we can join on a query. */ function testJoinSubquery() { - $this->enableModules(array('system'), FALSE); $this->installSchema('system', 'sequences'); - $this->enableModules(array('field', 'user')); $account = entity_create('user', array( 'name' => $this->randomMachineName(), diff --git a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php index 7e78d6b309..1a719d2f45 100644 --- a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php +++ b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelSiteTest.php @@ -39,7 +39,7 @@ class: Drupal\Core\Cache\MemoryBackendFactory file_put_contents($this->siteDirectory . '/services.yml', $doc); // Rebuild the container. - $this->kernel->rebuildContainer(); + $this->container->get('kernel')->rebuildContainer(); $this->assertTrue($this->container->has('site.service.yml')); $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory'); diff --git a/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php b/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php index 528c73b7ec..6f3908694a 100644 --- a/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php +++ b/core/modules/system/src/Tests/Entity/ConfigEntityQueryTest.php @@ -22,7 +22,7 @@ class ConfigEntityQueryTest extends DrupalUnitTestBase { * * @var array */ - static $modules = array('config_test'); + static $modules = array('entity', 'config_test'); /** * Stores the search results for alter comparison. @@ -49,7 +49,6 @@ protected function setUp() { parent::setUp(); $this->entities = array(); - $this->enableModules(array('entity'), TRUE); $this->factory = $this->container->get('entity.query'); // These two are here to make sure that matchArray needs to go over several @@ -346,7 +345,7 @@ public function testConfigEntityQuery() { /** * Tests count query. */ - protected function testCount() { + public function testCount() { // Test count on no conditions. $count = $this->factory->get('config_query_test') ->count() @@ -372,7 +371,7 @@ protected function testCount() { /** * Tests sorting and range on config entity queries. */ - protected function testSortRange() { + public function testSortRange() { // Sort by simple ascending/descending. $this->queryResults = $this->factory->get('config_query_test') ->sort('number', 'DESC') @@ -428,7 +427,7 @@ protected function testSortRange() { /** * Tests dotted path matching. */ - protected function testDotted() { + public function testDotted() { $this->queryResults = $this->factory->get('config_query_test') ->condition('array.level1.*', 1) ->execute(); diff --git a/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php b/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php index 8727cc6cd6..52d5755423 100644 --- a/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php +++ b/core/modules/system/src/Tests/Entity/EntityAccessControlHandlerTest.php @@ -119,7 +119,7 @@ function testEntityTranslationAccess() { /** * Tests hook invocations. */ - protected function testHooks() { + public function testHooks() { $state = $this->container->get('state'); $entity = entity_create('entity_test', array( 'name' => 'test', diff --git a/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php b/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php index 9b51d86631..334ab587a9 100644 --- a/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php +++ b/core/modules/system/src/Tests/Entity/EntityBundleFieldTest.php @@ -28,13 +28,6 @@ class EntityBundleFieldTest extends EntityUnitTestBase { */ protected $database; - /** - * Modules to enable. - * - * @var array - */ - public static $modules = array('menu_link'); - /** * {@inheritdoc} */ diff --git a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php index 2f41f43cae..56bbd9871f 100644 --- a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php +++ b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php @@ -135,7 +135,6 @@ public function testBlockHooks() { */ public function testCommentHooks() { $account = $this->createUser(); - $this->enableModules(array('entity', 'filter')); entity_create('node_type', array( 'type' => 'article', 'name' => 'Article', diff --git a/core/modules/system/src/Tests/Entity/EntityFieldTest.php b/core/modules/system/src/Tests/Entity/EntityFieldTest.php index c890ef3807..6f9eb7941a 100644 --- a/core/modules/system/src/Tests/Entity/EntityFieldTest.php +++ b/core/modules/system/src/Tests/Entity/EntityFieldTest.php @@ -34,6 +34,21 @@ class EntityFieldTest extends EntityUnitTestBase { */ public static $modules = array('filter', 'text', 'node', 'user'); + /** + * @var string + */ + protected $entity_name; + + /** + * @var \Drupal\user\Entity\User + */ + protected $entity_user; + + /** + * @var string + */ + protected $entity_field_text; + public function setUp() { parent::setUp(); @@ -230,9 +245,9 @@ protected function assertReadWrite($entity_type) { // Tests adding a value to a field item list. $entity->name[] = 'Another name'; - $this->assertEqual($entity->name[1]->value == 'Another name', format_string('%entity_type: List item added via [].', array('%entity_type' => $entity_type))); + $this->assertEqual($entity->name[1]->value, 'Another name', format_string('%entity_type: List item added via [].', array('%entity_type' => $entity_type))); $entity->name[2]->value = 'Third name'; - $this->assertEqual($entity->name[2]->value == 'Third name', format_string('%entity_type: List item added by a accessing not yet created item.', array('%entity_type' => $entity_type))); + $this->assertEqual($entity->name[2]->value, 'Third name', format_string('%entity_type: List item added by a accessing not yet created item.', array('%entity_type' => $entity_type))); // Test removing and empty-ing list items. $this->assertEqual(count($entity->name), 3, format_string('%entity_type: List has 3 items.', array('%entity_type' => $entity_type))); diff --git a/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php b/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php index 19cf1ad55d..ffc7830c95 100644 --- a/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php +++ b/core/modules/system/src/Tests/Entity/EntityLanguageTestBase.php @@ -36,6 +36,13 @@ abstract class EntityLanguageTestBase extends EntityUnitTestBase { */ protected $field_name; + /** + * Test field instances, keyed by entity type. + * + * @var array + */ + protected $instance; + /** * The untranslatable test field name. * diff --git a/core/modules/system/src/Tests/Entity/EntityQueryTest.php b/core/modules/system/src/Tests/Entity/EntityQueryTest.php index 478068e979..4d47e3fc30 100644 --- a/core/modules/system/src/Tests/Entity/EntityQueryTest.php +++ b/core/modules/system/src/Tests/Entity/EntityQueryTest.php @@ -373,7 +373,7 @@ function testSort() { /** * Test tablesort(). */ - protected function testTableSort() { + public function testTableSort() { // While ordering on bundles do not give us a definite order, we can still // assert that all entities from one bundle are after the other as the // order dictates. @@ -422,7 +422,7 @@ protected function testTableSort() { /** * Test that count queries are separated across entity types. */ - protected function testCount() { + public function testCount() { // Create a field with the same name in a different entity type. $field_name = $this->figures; $field_storage = entity_create('field_storage_config', array( diff --git a/core/modules/system/src/Tests/Entity/EntityValidationTest.php b/core/modules/system/src/Tests/Entity/EntityValidationTest.php index ec858bdbf2..1f87c74100 100644 --- a/core/modules/system/src/Tests/Entity/EntityValidationTest.php +++ b/core/modules/system/src/Tests/Entity/EntityValidationTest.php @@ -21,6 +21,21 @@ class EntityValidationTest extends EntityUnitTestBase { */ public static $modules = array('filter', 'text'); + /** + * @var string + */ + protected $entity_name; + + /** + * @var \Drupal\user\Entity\User + */ + protected $entity_user; + + /** + * @var string + */ + protected $entity_field_text; + /** * {@inheritdoc} */ diff --git a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php index 2ae87fca14..94a2f9a6ad 100644 --- a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php +++ b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php @@ -36,6 +36,11 @@ class FieldSqlStorageTest extends EntityUnitTestBase { */ protected $field_name; + /** + * @var int + */ + protected $field_cardinality; + /** * A field storage to use in this class. * @@ -50,6 +55,11 @@ class FieldSqlStorageTest extends EntityUnitTestBase { */ protected $instance; + /** + * @var string + */ + protected $table; + /** * Name of the revision table of the field. * diff --git a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php index 597bb03c43..820e4aa8db 100644 --- a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php @@ -18,6 +18,11 @@ */ class ModuleHandlerTest extends KernelTestBase { + /** + * {@inheritdoc} + */ + public static $modules = array('system'); + /** * {@inheritdoc} */ diff --git a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php index 03a94cfe5c..7f5caad447 100644 --- a/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php +++ b/core/modules/system/src/Tests/Extension/ThemeHandlerTest.php @@ -23,7 +23,7 @@ class ThemeHandlerTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('system', 'menu_link'); + public static $modules = array('system'); public function containerBuild(ContainerBuilder $container) { parent::containerBuild($container); diff --git a/core/modules/system/src/Tests/File/NameMungingTest.php b/core/modules/system/src/Tests/File/NameMungingTest.php index 15840677d3..a4542cbd46 100644 --- a/core/modules/system/src/Tests/File/NameMungingTest.php +++ b/core/modules/system/src/Tests/File/NameMungingTest.php @@ -13,6 +13,22 @@ * @group File */ class NameMungingTest extends FileTestBase { + + /** + * @var string + */ + protected $bad_extension; + + /** + * @var string + */ + protected $name; + + /** + * @var string + */ + protected $name_with_uc_ext; + function setUp() { parent::setUp(); $this->bad_extension = 'php'; diff --git a/core/modules/system/src/Tests/File/ScanDirectoryTest.php b/core/modules/system/src/Tests/File/ScanDirectoryTest.php index cda57dedbb..0777460b63 100644 --- a/core/modules/system/src/Tests/File/ScanDirectoryTest.php +++ b/core/modules/system/src/Tests/File/ScanDirectoryTest.php @@ -21,6 +21,11 @@ class ScanDirectoryTest extends FileTestBase { */ public static $modules = array('file_test'); + /** + * @var string + */ + protected $path; + function setUp() { parent::setUp(); $this->path = drupal_get_path('module', 'simpletest') . '/files'; diff --git a/core/modules/system/src/Tests/Form/FormCacheTest.php b/core/modules/system/src/Tests/Form/FormCacheTest.php index 57dbb28588..f5510927de 100644 --- a/core/modules/system/src/Tests/Form/FormCacheTest.php +++ b/core/modules/system/src/Tests/Form/FormCacheTest.php @@ -25,6 +25,21 @@ class FormCacheTest extends DrupalUnitTestBase { */ public static $modules = array('system', 'user'); + /** + * @var string + */ + protected $form_build_id; + + /** + * @var array + */ + protected $form; + + /** + * @var array + */ + protected $form_state; + public function setUp() { parent::setUp(); $this->installSchema('system', array('key_value_expire')); diff --git a/core/modules/system/src/Tests/Path/PathUnitTestBase.php b/core/modules/system/src/Tests/Path/PathUnitTestBase.php index 4807d47ab9..618d72e303 100644 --- a/core/modules/system/src/Tests/Path/PathUnitTestBase.php +++ b/core/modules/system/src/Tests/Path/PathUnitTestBase.php @@ -15,6 +15,11 @@ */ abstract class PathUnitTestBase extends DrupalUnitTestBase { + /** + * @var \Drupal\system\Tests\Path\UrlAliasFixtures + */ + protected $fixtures; + public function setUp() { parent::setUp(); $this->fixtures = new UrlAliasFixtures(); diff --git a/core/modules/system/src/Tests/System/ScriptTest.php b/core/modules/system/src/Tests/System/ScriptTest.php index 0be6217f9e..6f6d871694 100644 --- a/core/modules/system/src/Tests/System/ScriptTest.php +++ b/core/modules/system/src/Tests/System/ScriptTest.php @@ -16,6 +16,11 @@ */ class ScriptTest extends DrupalUnitTestBase { + protected function setUp() { + parent::setUp(); + require_once DRUPAL_ROOT . '/core/includes/install.inc'; + } + /** * Tests password-hash.sh. */ diff --git a/core/modules/system/src/Tests/TypedData/TypedDataTest.php b/core/modules/system/src/Tests/TypedData/TypedDataTest.php index 1adc2ffa20..de4e6231f5 100644 --- a/core/modules/system/src/Tests/TypedData/TypedDataTest.php +++ b/core/modules/system/src/Tests/TypedData/TypedDataTest.php @@ -273,12 +273,12 @@ public function testGetAndSet() { $this->assertEqual($typed_data->validate()->count(), 0); // Try setting by URI. $typed_data->setValue($files[1]->getFileUri()); - $this->assertEqual(is_resource($typed_data->getValue()), fopen($files[1]->getFileUri(), 'r'), 'Binary value was changed.'); + $this->assertEqual(fgets($typed_data->getValue()), fgets(fopen($files[1]->getFileUri(), 'r')), 'Binary value was changed.'); $this->assertTrue(is_string($typed_data->getString()), 'Binary value was converted to string'); $this->assertEqual($typed_data->validate()->count(), 0); // Try setting by resource. $typed_data->setValue(fopen($files[2]->getFileUri(), 'r')); - $this->assertEqual(is_resource($typed_data->getValue()), fopen($files[2]->getFileUri(), 'r'), 'Binary value was changed.'); + $this->assertEqual(fgets($typed_data->getValue()), fgets(fopen($files[2]->getFileUri(), 'r')), 'Binary value was changed.'); $this->assertTrue(is_string($typed_data->getString()), 'Binary value was converted to string'); $this->assertEqual($typed_data->validate()->count(), 0); $typed_data->setValue(NULL); diff --git a/core/modules/text/src/Tests/Formatter/TextFormatterTest.php b/core/modules/text/src/Tests/Formatter/TextFormatterTest.php index 4d997677ae..143928a20e 100644 --- a/core/modules/text/src/Tests/Formatter/TextFormatterTest.php +++ b/core/modules/text/src/Tests/Formatter/TextFormatterTest.php @@ -119,7 +119,6 @@ public function testFormatters() { // Verify the unprocessed text field formatter's render array. $build = $entity->get('unprocessed_text')->view(array('type' => $formatter)); - debug($build[0]); $this->assertEqual($build[0]['#markup'], 'Hello, world!'); $this->assertTrue(!isset($build[0]['#cache']), format_string('The @formatter formatter has the expected cache tags when formatting an unprocessed text field.', array('@formatter' => $formatter))); } diff --git a/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php b/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php index 167bcec089..3af2dce399 100644 --- a/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php +++ b/core/modules/text/src/Tests/Formatter/TextPlainUnitTest.php @@ -30,6 +30,71 @@ class TextPlainUnitTest extends DrupalUnitTestBase { */ public static $modules = array('entity', 'field', 'text', 'entity_test', 'system', 'filter', 'user'); + /** + * @var string + */ + protected $entity_type; + + /** + * @var string + */ + protected $bundle; + + /** + * @var string + */ + protected $field_name; + + /** + * @var string + */ + protected $field_type; + + /** + * @var array + */ + protected $field_settings; + + /** + * @var array + */ + protected $instance_settings; + + /** + * @var string + */ + protected $formatter_type; + + /** + * @var array + */ + protected $formatter_settings; + + /** + * @var \Drupal\field\Entity\FieldStorageConfig + */ + protected $fieldStorage; + + /** + * @var \Drupal\field\Entity\FieldInstanceConfig + */ + protected $instance; + + /** + * @var string + */ + protected $view_mode; + + /** + * @var \Drupal\entity\Entity\EntityViewDisplay + */ + protected $display; + + /** + * @var string + */ + protected $langcode; + function setUp() { parent::setUp(); diff --git a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php index 47849b9ede..492218f97e 100644 --- a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php +++ b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php @@ -30,6 +30,7 @@ class UserAccountFormFieldsTest extends DrupalUnitTestBase { */ function testInstallConfigureForm() { require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; + require_once DRUPAL_ROOT . '/core/includes/install.inc'; $install_state = install_state_defaults(); $form_state = new FormState(); $form_state['build_info']['args'][] = &$install_state; diff --git a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php index 3c29b9eba4..8eb006d0bc 100644 --- a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php +++ b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php @@ -24,7 +24,7 @@ class RowEntityRenderersTest extends ViewUnitTestBase { * * @var array */ - public static $modules = array('entity', 'field', 'filter', 'text', 'node', 'user', 'language', 'menu_link'); + public static $modules = array('entity', 'field', 'filter', 'text', 'node', 'user', 'language'); /** * Views used by this test. diff --git a/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php b/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php index cdd1626c46..e019168770 100644 --- a/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php +++ b/core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php @@ -22,6 +22,11 @@ abstract class RelationshipJoinTestBase extends PluginUnitTestBase { */ public static $modules = array('system', 'user', 'entity', 'field'); + /** + * @var \Drupal\user\Entity\User + */ + protected $root_user; + /** * Overrides \Drupal\views\Tests\ViewUnitTestBase::setUpFixtures(). */ diff --git a/core/modules/views/src/Tests/Plugin/RowEntityTest.php b/core/modules/views/src/Tests/Plugin/RowEntityTest.php index 6fb65d31da..583fb61df3 100644 --- a/core/modules/views/src/Tests/Plugin/RowEntityTest.php +++ b/core/modules/views/src/Tests/Plugin/RowEntityTest.php @@ -24,7 +24,7 @@ class RowEntityTest extends ViewUnitTestBase { * * @var array */ - public static $modules = array('taxonomy', 'text', 'filter', 'field', 'entity', 'system', 'menu_link'); + public static $modules = array('taxonomy', 'text', 'filter', 'field', 'entity', 'system'); /** * Views used by this test. diff --git a/core/modules/views/src/Tests/ViewExecutableTest.php b/core/modules/views/src/Tests/ViewExecutableTest.php index 11a1b7fe77..fd7f628599 100644 --- a/core/modules/views/src/Tests/ViewExecutableTest.php +++ b/core/modules/views/src/Tests/ViewExecutableTest.php @@ -30,7 +30,7 @@ */ class ViewExecutableTest extends ViewUnitTestBase { - public static $modules = array('system', 'node', 'comment', 'user', 'filter', 'entity', 'field', 'field_sql_storage', 'text'); + public static $modules = array('system', 'node', 'comment', 'user', 'filter', 'entity', 'field', 'text'); /** * Views used by this test. diff --git a/core/modules/views/src/Tests/ViewStorageTest.php b/core/modules/views/src/Tests/ViewStorageTest.php index 08c9e27a66..fc78a9e564 100644 --- a/core/modules/views/src/Tests/ViewStorageTest.php +++ b/core/modules/views/src/Tests/ViewStorageTest.php @@ -186,7 +186,6 @@ protected function displayTests() { */ protected function displayMethodTests() { // Enable the system module so l() can work using url_alias table. - $this->enableModules(array('system')); $this->installSchema('system', 'url_alias'); $config['display'] = array( diff --git a/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php b/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php index 0304607029..72a8823065 100644 --- a/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php +++ b/core/modules/views/src/Tests/Wizard/WizardPluginBaseUnitTest.php @@ -25,7 +25,7 @@ class WizardPluginBaseUnitTest extends ViewUnitTestBase { * * @var array */ - public static $modules = array('language', 'system', 'user'); + public static $modules = array('language', 'system', 'user', 'views_ui'); /** * Contains thw wizard plugin manager. @@ -39,8 +39,6 @@ protected function setUp() { $this->installConfig(array('language')); - $this->enableModules(array('views_ui')); - $this->wizard = $this->container->get('plugin.manager.views.wizard')->createInstance('standard:views_test_data', array()); } -- GitLab