diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php index 3f4d7b5..e26f889 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/Views/IntegrationTest.php @@ -55,7 +55,8 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('aggregator', array('aggregator_item', 'aggregator_feed')); + $this->installEntitySchema('aggregator_item'); + $this->installEntitySchema('aggregator_feed'); ViewTestData::createTestViews(get_class($this), array('aggregator_test_views')); diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php index 881c965..ae613db 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php @@ -38,7 +38,7 @@ public static function getInfo() { */ public function setUp() { parent::setUp(); - $this->installSchema('node', array('node', 'node_field_data', 'node_field_revision', 'node_revision')); + $this->installEntitySchema('node'); } /** diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportRecreateTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportRecreateTest.php index 9f5ed90..6bdabcd 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportRecreateTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportRecreateTest.php @@ -43,7 +43,7 @@ public function setUp() { parent::setUp(); $this->installSchema('system', 'config_snapshot'); - $this->installSchema('node', 'node'); + $this->installEntitySchema('node'); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorFileUsageTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorFileUsageTest.php index 3be50ec..40af4bc 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/EditorFileUsageTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorFileUsageTest.php @@ -31,8 +31,8 @@ public static function getInfo() { public function setUp() { parent::setUp(); - $this->installSchema('node', array('node', 'node_access', 'node_field_data', 'node_field_revision', 'node_revision')); - $this->installSchema('file', array('file_managed', 'file_usage')); + $this->installEntitySchema('node'); + $this->installEntitySchema('file'); // Add text formats. $filtered_html_format = entity_create('filter_format', array( diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php b/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php index 8f9d07c..86f5ab5 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php +++ b/core/modules/field/lib/Drupal/field/Tests/FieldUnitTestBase.php @@ -35,9 +35,9 @@ */ function setUp() { parent::setUp(); - $this->installEntitySchema('entity_test', 'entity_test'); + $this->installEntitySchema('entity_test'); + $this->installEntitySchema('user'); $this->installSchema('system', array('sequences', 'config_snapshot')); - $this->installSchema('user', array('users', 'users_roles')); // Set default storage backend and configure the theme system. $this->installConfig(array('field', 'system')); diff --git a/core/modules/file/lib/Drupal/file/Tests/FileManagedUnitTestBase.php b/core/modules/file/lib/Drupal/file/Tests/FileManagedUnitTestBase.php index c9ec86d..56a2940 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileManagedUnitTestBase.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileManagedUnitTestBase.php @@ -29,8 +29,8 @@ function setUp() { file_test_reset(); $this->installConfig(array('system')); - $this->installSchema('file', array('file_managed', 'file_usage')); - $this->installSchema('user', array('users', 'users_roles')); + $this->installEntitySchema('file'); + $this->installEntitySchema('user'); // Make sure that a user with uid 1 exists, self::createFile() relies on // it. diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php index 9d8f3ca..7423b70 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php @@ -30,7 +30,7 @@ function setUp() { // filter_permission() calls into url() to output a link in the description. $this->installSchema('system', 'url_alias'); - $this->installSchema('user', array('users_roles')); + $this->installEntitySchema('user'); // Install filter_test module, which ships with custom default format. $this->installConfig(array('user', 'filter_test')); diff --git a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php index e3c09f6..4ec350e 100644 --- a/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php +++ b/core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php @@ -62,7 +62,7 @@ function setUp() { parent::setUp(); $this->installSchema('system', array('url_alias', 'router')); - $this->installSchema('user', array('users')); + $this->installEntitySchema('user'); $this->installEntitySchema('entity_test'); $this->installConfig(array('field', 'language')); diff --git a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php index 065cdca..a52b9fa 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Condition/NodeConditionTest.php @@ -26,7 +26,7 @@ public static function getInfo() { public function setUp() { parent::setUp(); - $this->installSchema('node', array('node', 'node_field_data', 'node_field_revision', 'node_revision')); + $this->installEntitySchema('node'); // Create the node bundles required for testing. $type = entity_create('node_type', array('type' => 'page', 'name' => 'page')); diff --git a/core/modules/node/lib/Drupal/node/Tests/Config/NodeImportCreateTest.php b/core/modules/node/lib/Drupal/node/Tests/Config/NodeImportCreateTest.php index 1d59ca1..dcf4e7e 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Config/NodeImportCreateTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Config/NodeImportCreateTest.php @@ -28,7 +28,7 @@ public function setUp() { parent::setUp(); $this->installSchema('system', array('config_snapshot')); - $this->installSchema('user', array('users')); + $this->installEntitySchema('user'); // Set default storage backend. $this->installConfig(array('field')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeLastChangedTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeLastChangedTest.php index bf23498..aa1dbfa 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeLastChangedTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeLastChangedTest.php @@ -31,11 +31,8 @@ public static function getInfo() { public function setUp() { parent::setUp(); - $this->installSchema('node', 'node'); - $this->installSchema('node', 'node_revision'); - $this->installSchema('node', 'node_field_data'); - $this->installSchema('node', 'node_field_revision'); - $this->installSchema('user', array('users')); + $this->installEntitySchema('node'); + $this->installEntitySchema('user'); } /** diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php index 717abcc..2b1e07f 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php @@ -38,7 +38,7 @@ public static function getInfo() { */ public function setUp() { parent::setUp(); - $this->installSchema('node', array('node', 'node_field_revision', 'node_field_data', 'node_revision')); + $this->installEntitySchema('node'); $this->installConfig(array('filter')); $node_type = entity_create('node_type', array('type' => 'article', 'name' => 'Article')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php index e71d75b..94c7ca3 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php @@ -34,7 +34,7 @@ public static function getInfo() { */ public function setUp() { parent::setUp(); - $this->installSchema('node', array('node', 'node_field_data', 'node_field_revision', 'node_revision')); + $this->installEntitySchema('node'); // Create a node type for testing. $type = entity_create('node_type', array('type' => 'page', 'name' => 'page')); diff --git a/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php b/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php index c4eb1ca..0c1dc03 100644 --- a/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php +++ b/core/modules/serialization/lib/Drupal/serialization/Tests/NormalizerTestBase.php @@ -22,7 +22,7 @@ protected function setUp() { parent::setUp(); $this->installEntitySchema('entity_test_mulrev'); - $this->installSchema('user', array('users', 'users_roles')); + $this->installEntitySchema('user'); $this->installSchema('system', array('url_alias')); $this->installConfig(array('field')); diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php index 6cd8d39..2148bd7 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php @@ -111,7 +111,7 @@ function testEnableModulesInstallContainer() { // Install Node module. $this->enableModules(array('field', 'node')); - $this->installSchema('node', array('node', 'node_field_data')); + $this->installEntitySchema('node'); // Perform an entity query against node. $query = \Drupal::entityQuery('node'); // Disable node access checks, since User module is not enabled. diff --git a/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php index 6f97da1..55ae046 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php @@ -45,7 +45,7 @@ protected function setUp() { parent::setUp(); $this->actionManager = $this->container->get('plugin.manager.action'); - $this->installSchema('user', array('users', 'users_roles')); + $this->installEntitySchema('user'); $this->installSchema('system', array('sequences')); } diff --git a/core/modules/system/lib/Drupal/system/Tests/TypedData/TypedDataTest.php b/core/modules/system/lib/Drupal/system/Tests/TypedData/TypedDataTest.php index 5893f7b..37c4af9 100644 --- a/core/modules/system/lib/Drupal/system/Tests/TypedData/TypedDataTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/TypedData/TypedDataTest.php @@ -44,7 +44,7 @@ public static function getInfo() { public function setUp() { parent::setup(); - $this->installSchema('file', array('file_managed', "file_usage")); + $this->installEntitySchema('file'); $this->typedDataManager = $this->container->get('typed_data_manager'); } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php index 737f662..1d96f61 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php @@ -34,7 +34,7 @@ public static function getInfo() { */ public function setUp() { parent::setUp(); - $this->installSchema('taxonomy', array('taxonomy_term_data')); + $this->installEntitySchema('taxonomy_tern'); } /** diff --git a/core/modules/user/lib/Drupal/user/Tests/UserInstallTest.php b/core/modules/user/lib/Drupal/user/Tests/UserInstallTest.php index 3c86a30..e157bea 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserInstallTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserInstallTest.php @@ -37,7 +37,7 @@ public static function getInfo() { */ protected function setUp() { parent::setUp(); - $this->installSchema('user', array('users')); + $this->installEntitySchema('user'); } @@ -45,7 +45,6 @@ protected function setUp() { * Test that the initial users have correct values. */ public function testUserInstall() { - user_install(); $anon = db_query('SELECT * FROM {users} WHERE uid = 0')->fetchObject(); $admin = db_query('SELECT * FROM {users} WHERE uid = 1')->fetchObject(); $this->assertFalse(empty($anon->uuid), 'Anon user has a UUID'); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php index 7beec6a..2b50084 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php @@ -36,7 +36,7 @@ public static function getInfo() { */ public function setUp() { parent::setUp(); - $this->installSchema('user', array('users')); + $this->installEntitySchema('user'); $this->installSchema('system', array('sequences')); } diff --git a/core/modules/user/lib/Drupal/user/Tests/Views/UserUnitTestBase.php b/core/modules/user/lib/Drupal/user/Tests/Views/UserUnitTestBase.php index eafc620..16ba123 100644 --- a/core/modules/user/lib/Drupal/user/Tests/Views/UserUnitTestBase.php +++ b/core/modules/user/lib/Drupal/user/Tests/Views/UserUnitTestBase.php @@ -48,7 +48,7 @@ protected function setUp() { ViewTestData::createTestViews(get_class($this), array('user_test_views')); - $this->installSchema('user', array('users', 'users_roles')); + $this->installEntitySchema('user'); $this->installSchema('system', 'sequences'); $entity_manager = $this->container->get('entity.manager'); diff --git a/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php b/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php index 1694fd0..c008a17 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Entity/RowEntityRenderersTest.php @@ -56,7 +56,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('node', array('node', 'node_revision', 'node_field_data', 'node_field_revision', 'node_access')); + $this->installEntitySchema('node'); $this->installSchema('user', array('users')); $this->installConfig(array('node', 'language')); diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php index 2ac78f8..3ab29d7 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTextTest.php @@ -38,7 +38,7 @@ protected function setUp() { parent::setUp(); $this->installConfig(array('system', 'filter')); - $this->installSchema('user', array('users')); + $this->installEntitySchema('user'); } public function testAreaText() { diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAliasTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAliasTest.php index caec4c7..ac9b920 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAliasTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAliasTest.php @@ -35,7 +35,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('user', 'users'); + $this->installEntitySchema('user'); } /** diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/RelationshipJoinTestBase.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/RelationshipJoinTestBase.php index fae3515..5542619 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/RelationshipJoinTestBase.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/RelationshipJoinTestBase.php @@ -26,7 +26,7 @@ * Overrides \Drupal\views\Tests\ViewUnitTestBase::setUpFixtures(). */ protected function setUpFixtures() { - $this->installSchema('user', array('users', 'users_roles')); + $this->installEntitySchema('user'); $this->installConfig(array('user')); parent::setUpFixtures(); diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php index 5fa35b8..0525a24 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php @@ -52,7 +52,7 @@ public static function getInfo() { protected function setUp() { parent::setUp(); - $this->installSchema('taxonomy', array('taxonomy_term_data', 'taxonomy_term_hierarchy')); + $this->installEntitySchema('taxonomy_term'); $this->installConfig(array('taxonomy')); \Drupal::service('router.builder')->rebuild(); } diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php index c0228ba..4e2715d 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php @@ -84,10 +84,11 @@ public static function getInfo() { } protected function setUpFixtures() { - $this->installSchema('user', array('users')); - $this->installSchema('node', array('node', 'node_field_data')); - $this->installSchema('comment', array('comment', 'comment_entity_statistics')); + $this->installEntitySchema('user'); + $this->installEntitySchema('node'); + $this->installEntitySchema('comment'); $this->installConfig(array('field')); + entity_create('node_type', array( 'type' => 'page', 'name' => 'Page',