You are here

public function ConfigInstallTest::testCollectionInstallationNoCollections in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::testCollectionInstallationNoCollections()

Tests that collections are ignored if the event does not return anything.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php, line 87

Class

ConfigInstallTest
Tests installation of configuration objects in installation functionality.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testCollectionInstallationNoCollections() {

  // Install the test module.
  $this
    ->enableModules([
    'config_collection_install_test',
  ]);
  $this
    ->installConfig([
    'config_collection_install_test',
  ]);

  /** @var \Drupal\Core\Config\StorageInterface $active_storage */
  $active_storage = \Drupal::service('config.storage');
  $this
    ->assertEquals([], $active_storage
    ->getAllCollectionNames());
}