diff --git a/core/modules/block/src/Tests/BlockConfigSchemaTest.php b/core/modules/block/src/Tests/BlockConfigSchemaTest.php index 2be1a6db6097388d9b01d8b4feaf019993221da4..6cae8e15f0596e6f0384cb371ad924af5ee12b59 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 f84f73e2a765ef40e1882bb45106e2c2be6bf93a..3a5a07054dc72b7350e1349e35d58fd313bd4a30 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 41b81b8b3ecc247d84b06bc555bfc694ded133cf..a80db68d1324002d2ed5803bfecf59ff3e0b286a 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 787631b86494fe64026d2c1c2fbdcfee36d1ea53..3c809c4eb57db2a049aa394fa58f0a3bda0a2cae 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 a65aed0bd620de6aa2c8d42b436649b9d3b0f2c2..b71b02f614f942bed89477216a2f4494c3928962 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 984583e712f5d797097b3f25d25238493bf76078..b9daa6cd0287897205f60f31ea2be45e046086c0 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 bd02b7d59226bf465f90010954e4a5b67253efb7..72beb6a2f2e2c1c1e9e57a6f7de32339d3a99500 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 2bc48fa628673022e68e08291c85c6f33125c778..e3c4e76e1d52f6e7746ff6cce5ac6397efef5a21 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 4aadad515dec2c4a7c3e3cdbea240c8e291804b1..6165044da550eca432f54e6bbb6b1d073a94ec15 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 f771f3d5d66c432af4779ee200d124b1c081e3ef..89f7cf05254b314b10d4bf3d32a5363a19ea68cd 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 55f37da1539361c8d76f785c4fbbfe35b66f204d..9e071d9021fce7586de7c8eebb4eda4bba92b332 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 a8f81e286cb341ff7fa4e04c67d68a22710be79e..73494f67ec14f64bdd85ac99066b99b4b71ab865 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 1e6d05d907f335a94a0890bc3dc0f04a39d5bbd5..1efa671fac3b7ee3f9c5996be72e57dbf062dae5 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 ee7eb9d084b53063cf2ece94e873c6d55de63ed0..eaaec9a07f11c72e1cd44427a4ac632b30cde6b1 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 20bb1375162138c8d6b3de34f1c4b7e9106495f2..237749c614a2acef3f1ed15b91a7aabcd8aa7c75 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 c26d912ea898cb751494d33e7821cc4cd4e7ea22..6584ec158a5b12315bebd539d8b84c32dfba23cf 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 4f81f0843dba90d13d3f0c9f6013ae3387f181f5..6176225edcf86c08f97e758dc9994f33665e80b9 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 2ebff7468dc916f57a4493d0f338eeab00b7435e..b5bb3487edf3fe8de72df5ac6600592f94c2ee04 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 5160ad0ef9fdc2282a24525f7185b189d5651cea..37d3bcc66b7ee036a37d7f75cd0d84956787b2be 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 f665071f367960d2159069bb8f4529b46fb957c2..bf1df1475f72675a37af13d784c1c01f6c030921 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 772ec4fa6a1bf24bde567ad6adb5791020f56bc7..e97a73c7ee4caad088417054ef806d7ea3268e13 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 7eb8d3313db844aedd51cc027b8c76ce33abb63f..623a6265373654b58b7f380c48754171645156c2 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 7dc6c74514604682755273017e596a0a8ef4f1fd..6b4dc12ab63f0bf8b2f35a897230cfd873a1a7ca 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 9a26acadac8a2a6588ee06abf662ff19012df512..e0502c7384e9e87f3d84480b3143577c66ff89f7 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 95a4258bcd14c4a58c255cb4949830c5af8543ad..80c3d3dc1f716f9e1987dab0ac3089aab7eaf881 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 134de2cae656dcb032cb05faccbf2c6515de547e..51745017cff5e2214f6b4f4a454216bce3518eeb 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 a949b3542c44695d7465e082d27f33627d83a5a8..debff49fa1e60fba2ddd325617401b8b848d65d1 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 7932816e81dcb1ed00556a1458e7c7baa699412a..f63d84daaabfc43093fc2ceb6fce0761e609a2d9 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 7e78d6b309f5adc96b5c7ed767e7d3e965813011..1a719d2f45a8351eed208322b29ff808f094f8ad 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 528c73b7ecd533f7aefdd691270aa989b2e7a645..6f3908694a3ed77c96adb101a7a6d879b70405d5 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 8727cc6cd65718267a74577fd0c0c23981c67259..52d57554235f8c2933e6dbb98f5471ccfe72ffd7 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 9b51d86631fd7b8731c2eb3f90a754f92bf3b5b3..334ab587a9a8b73026dc5047ce88b8a88996cc61 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 2f41f43cae6f4af746668600297d2ae25699e823..56bbd9871f608242b602615fef75107826593d7f 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 c890ef3807cf746b9ef67cd2e2d51646ede66f5a..6f9eb7941a75fcd471abb46c38b4645f70632e18 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 19cf1ad55db8181a102f6c31a336970febace660..ffc7830c95174147be36d3f017c4811025c0a9a7 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 478068e97989839d971030bd72fadc39f7eac659..4d47e3fc301f0e4ae419f66cf097893090f774b6 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 ec858bdbf289f1be908215196678e19aa9e04f5e..1f87c741007b16879174285a75ab812e60d5ffc8 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 2ae87fca14ba871343769a741fc3d4ed837d9d66..94a2f9a6adacedd941076a784fcbd889f86abf5d 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 597bb03c43aa53ec352933b1886c1003b335c517..820e4aa8dbc32538650267ef16a0d31d14617e6c 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 03a94cfe5cbc2510c38541ac6e65a58fd5b3e6d2..7f5caad447f7748f4e1f3ea3db72133ec368c9fc 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 15840677d310e9c28a61ea23d441100796ca214e..a4542cbd467805faab18de30220acf9205b93e08 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 cda57dedbbc4afa20d2bfcee4906184d66a0c18b..0777460b6361b4ce1c5402a67c4e9f2d380f3e0a 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 57dbb28588172f0a944faec91ebc248635fcba0b..f5510927de58ff38dc907803a751130774c8e6f2 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 4807d47ab952fc44b8049d13ef0ccc443e3230ee..618d72e3035ab0ae0997cc050e844754c95ac129 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 0be6217f9e2981bd57d1b5b568b2b7a1adc04eaa..6f6d871694d9e0efa56e201ec96e9e042a653c70 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 1adc2ffa208ef551d77e31da515833a5b33a198b..de4e6231f591d6748201dceb4f818a89b5ad211d 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 4d997677ae71d05f4597a93db6b3d48ccd91f3b1..143928a20e40adcfe62e11b1e09c1007104403fb 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 167bcec0895591cb5cb011af64ba1d7ed0c91d78..3af2dce3995028acbb1389aa5233b546cdc906e6 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 47849b9edec9d79680edbe2b6d6ccfaa3027f493..492218f97eaa15a85dd5e741d30c31254aa8b1b1 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 3c29b9eba45e213a04fc12f61eceeeca152d95d0..8eb006d0bc476a9933e69f990485dddcdc30e363 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 cdd1626c468416fc91a9942bf586d8fdd1580785..e01916877034a1a84e6487e37c0dee422babecf9 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 6fb65d31da608a5619a570fe1858bad8bbbfa379..583fb61df35ca27a17cf765301e7159ba56c0f53 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 11a1b7fe77d3b217380b880b6c00020c8d50ed0b..fd7f628599aa64b4502aca370b5ad43f76bdabb9 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 08c9e27a66c3c8ed328551dc794582d00cc37cb4..fc78a9e5646822baa882cdbbc19b792505eb2832 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 0304607029f5e574e93d710f881b637b6f179ac1..72a8823065caa838c6a04054f4ab2ffa39004d5e 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()); }