diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index fde8cb0..d702b26 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -519,6 +519,15 @@ protected function validateDependencies($config_name, array $data, array $enable if (isset($all_dependencies['enforced'])) { $all_dependencies = array_merge($all_dependencies, $data['dependencies']['enforced']); } + // Ensure the configuration entity type provider is in the list of + // dependencies. + list($provider) = explode('.', $config_name, 2); + if (!isset($all_dependencies['module'])) { + $all_dependencies['module'][] = $provider; + } + elseif (!in_array($provider, $all_dependencies['module'])) { + $all_dependencies['module'][] = $provider; + } foreach ($all_dependencies as $type => $dependencies) { $list_to_check = []; diff --git a/core/modules/block/tests/modules/block_test/block_test.info.yml b/core/modules/block/tests/modules/block_test/block_test.info.yml index 9a8895f..fceed36 100644 --- a/core/modules/block/tests/modules/block_test/block_test.info.yml +++ b/core/modules/block/tests/modules/block_test/block_test.info.yml @@ -4,3 +4,5 @@ description: 'Provides test blocks.' package: Testing version: VERSION core: 8.x +dependencies: + - block diff --git a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php index 763d106..3df2879 100644 --- a/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php +++ b/core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php @@ -42,7 +42,7 @@ protected function setUp() { // Install tables and config needed to render comments. $this->installSchema('comment', array('comment_entity_statistics')); - $this->installConfig(array('system', 'filter')); + $this->installConfig(array('system', 'filter', 'comment')); // Comment rendering generates links, so build the router. $this->installSchema('system', array('router')); diff --git a/core/modules/comment/src/Tests/CommentFieldAccessTest.php b/core/modules/comment/src/Tests/CommentFieldAccessTest.php index 78e5146..c51b47e 100644 --- a/core/modules/comment/src/Tests/CommentFieldAccessTest.php +++ b/core/modules/comment/src/Tests/CommentFieldAccessTest.php @@ -78,7 +78,7 @@ class CommentFieldAccessTest extends EntityUnitTestBase { */ protected function setUp() { parent::setUp(); - $this->installConfig(array('user')); + $this->installConfig(array('user', 'comment')); $this->installSchema('comment', array('comment_entity_statistics')); } diff --git a/core/modules/contact/src/Tests/MessageEntityTest.php b/core/modules/contact/src/Tests/MessageEntityTest.php index f888345..69ad3e8 100644 --- a/core/modules/contact/src/Tests/MessageEntityTest.php +++ b/core/modules/contact/src/Tests/MessageEntityTest.php @@ -32,7 +32,7 @@ class MessageEntityTest extends KernelTestBase { protected function setUp() { parent::setUp(); - $this->installConfig(array('contact')); + $this->installConfig(array('contact', 'contact_test')); } /** diff --git a/core/modules/editor/src/Tests/EditorFileUsageTest.php b/core/modules/editor/src/Tests/EditorFileUsageTest.php index 3e66cef..7b5210e 100644 --- a/core/modules/editor/src/Tests/EditorFileUsageTest.php +++ b/core/modules/editor/src/Tests/EditorFileUsageTest.php @@ -28,6 +28,7 @@ protected function setUp() { $this->installEntitySchema('file'); $this->installSchema('node', array('node_access')); $this->installSchema('file', array('file_usage')); + $this->installConfig(['node']); // Add text formats. $filtered_html_format = entity_create('filter_format', array( diff --git a/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml b/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml index 67a5f48..e465519 100644 --- a/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml +++ b/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.info.yml @@ -6,3 +6,6 @@ package: Testing version: VERSION dependencies: - entity_reference + - node + - user + - views diff --git a/core/modules/field/src/Tests/FieldImportChangeTest.php b/core/modules/field/src/Tests/FieldImportChangeTest.php index 8541664..c34ff31 100644 --- a/core/modules/field/src/Tests/FieldImportChangeTest.php +++ b/core/modules/field/src/Tests/FieldImportChangeTest.php @@ -31,6 +31,7 @@ class FieldImportChangeTest extends FieldUnitTestBase { * Tests importing an updated field. */ function testImportChange() { + $this->installConfig(['field_test_config']); $field_storage_id = 'field_test_import'; $field_id = "entity_test.entity_test.$field_storage_id"; $field_config_name = "field.field.$field_id"; diff --git a/core/modules/field/src/Tests/FieldImportDeleteTest.php b/core/modules/field/src/Tests/FieldImportDeleteTest.php index 030adfb..04eaecc 100644 --- a/core/modules/field/src/Tests/FieldImportDeleteTest.php +++ b/core/modules/field/src/Tests/FieldImportDeleteTest.php @@ -33,6 +33,7 @@ class FieldImportDeleteTest extends FieldUnitTestBase { * Tests deleting field storages and fields as part of config import. */ public function testImportDelete() { + $this->installConfig(['field_test_config']); // At this point there are 5 field configuration objects in the active // storage. // - field.storage.entity_test.field_test_import diff --git a/core/modules/field_ui/src/Tests/EntityDisplayTest.php b/core/modules/field_ui/src/Tests/EntityDisplayTest.php index ef0f476..98d2e3c 100644 --- a/core/modules/field_ui/src/Tests/EntityDisplayTest.php +++ b/core/modules/field_ui/src/Tests/EntityDisplayTest.php @@ -27,7 +27,7 @@ class EntityDisplayTest extends KernelTestBase { protected function setUp() { parent::setUp(); $this->installEntitySchema('node'); - $this->installConfig(array('field')); + $this->installConfig(array('field', 'node')); } /** diff --git a/core/modules/filter/src/Tests/FilterAPITest.php b/core/modules/filter/src/Tests/FilterAPITest.php index 50210b5..61c7766 100644 --- a/core/modules/filter/src/Tests/FilterAPITest.php +++ b/core/modules/filter/src/Tests/FilterAPITest.php @@ -28,7 +28,7 @@ class FilterAPITest extends EntityUnitTestBase { protected function setUp() { parent::setUp(); - $this->installConfig(array('system', 'filter')); + $this->installConfig(array('system', 'filter', 'filter_test')); } /** diff --git a/core/modules/filter/tests/filter_test/filter_test.info.yml b/core/modules/filter/tests/filter_test/filter_test.info.yml index dcefe8e..6e377bc 100644 --- a/core/modules/filter/tests/filter_test/filter_test.info.yml +++ b/core/modules/filter/tests/filter_test/filter_test.info.yml @@ -4,3 +4,5 @@ description: 'Tests filter hooks and functions.' package: Testing version: VERSION core: 8.x +dependencies: + - filter diff --git a/core/modules/hal/src/Tests/EntityTest.php b/core/modules/hal/src/Tests/EntityTest.php index a1b221d..9fb1014 100644 --- a/core/modules/hal/src/Tests/EntityTest.php +++ b/core/modules/hal/src/Tests/EntityTest.php @@ -35,6 +35,7 @@ protected function setUp() { $this->installSchema('system', array('sequences')); $this->installSchema('comment', array('comment_entity_statistics')); $this->installEntitySchema('taxonomy_term'); + $this->installConfig(['node', 'comment']); } /** diff --git a/core/modules/node/src/Tests/NodeBodyFieldStorageTest.php b/core/modules/node/src/Tests/NodeBodyFieldStorageTest.php index bdfa24c..54f83f2 100644 --- a/core/modules/node/src/Tests/NodeBodyFieldStorageTest.php +++ b/core/modules/node/src/Tests/NodeBodyFieldStorageTest.php @@ -36,7 +36,7 @@ protected function setUp() { $this->installSchema('user', 'users_data'); $this->installEntitySchema('user'); $this->installEntitySchema('node'); - $this->installConfig(array('field')); + $this->installConfig(array('field', 'node')); } /** diff --git a/core/modules/node/src/Tests/NodeTokenReplaceTest.php b/core/modules/node/src/Tests/NodeTokenReplaceTest.php index 7c0dfe7..7431f06 100644 --- a/core/modules/node/src/Tests/NodeTokenReplaceTest.php +++ b/core/modules/node/src/Tests/NodeTokenReplaceTest.php @@ -30,7 +30,7 @@ class NodeTokenReplaceTest extends TokenReplaceUnitTestBase { */ protected function setUp() { parent::setUp(); - $this->installConfig(array('filter')); + $this->installConfig(array('filter', 'node')); $node_type = entity_create('node_type', array('type' => 'article', 'name' => 'Article')); $node_type->save(); diff --git a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php index 9386983..deff706 100644 --- a/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php +++ b/core/modules/system/src/Tests/Entity/EntityCrudHookTest.php @@ -52,6 +52,7 @@ protected function setUp() { $this->installSchema('file', array('file_usage')); $this->installSchema('node', array('node_access')); $this->installSchema('comment', array('comment_entity_statistics')); + $this->installConfig(['node', 'comment']); } /** diff --git a/core/modules/user/user.info.yml b/core/modules/user/user.info.yml index 45a421a..8aec70e 100644 --- a/core/modules/user/user.info.yml +++ b/core/modules/user/user.info.yml @@ -6,3 +6,5 @@ version: VERSION core: 8.x required: true configure: user.admin_index +dependencies: + - system diff --git a/core/modules/views/src/Tests/ModuleTest.php b/core/modules/views/src/Tests/ModuleTest.php index 1f52a19..34f3dd5 100644 --- a/core/modules/views/src/Tests/ModuleTest.php +++ b/core/modules/views/src/Tests/ModuleTest.php @@ -142,7 +142,7 @@ public function customErrorHandler($error_level, $message, $filename, $line, $co * Tests the load wrapper/helper functions. */ public function testLoadFunctions() { - $this->enableModules(array('node')); + $this->enableModules(array('field', 'text', 'node')); $this->installConfig(array('node')); $storage = $this->container->get('entity.manager')->getStorage('view'); diff --git a/core/modules/views/src/Tests/ViewExecutableTest.php b/core/modules/views/src/Tests/ViewExecutableTest.php index 27c4e55..6affac2 100644 --- a/core/modules/views/src/Tests/ViewExecutableTest.php +++ b/core/modules/views/src/Tests/ViewExecutableTest.php @@ -20,6 +20,7 @@ use Drupal\views\Plugin\views\query\Sql; use Drupal\views\Plugin\views\pager\PagerPluginBase; use Drupal\views\Plugin\views\query\QueryPluginBase; +use Drupal\views\ViewsDataHelper; use Drupal\views_test_data\Plugin\views\display\DisplayTest; use Symfony\Component\HttpFoundation\Response; @@ -83,7 +84,9 @@ protected function setUpFixtures() { $this->installEntitySchema('node'); $this->installEntitySchema('comment'); $this->installSchema('comment', array('comment_entity_statistics')); - $this->installConfig(array('field')); + $this->installConfig(array('system', 'field', 'node', 'comment')); + // Clear the views data cache so it updated with the new entity information. + \Drupal::service('views.views_data')->clear(); entity_create('node_type', array( 'type' => 'page',