function ConfigInstallTest::testCollectionInstallationNoCollections

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::testCollectionInstallationNoCollections()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::testCollectionInstallationNoCollections()
  3. 10 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 90

Class

ConfigInstallTest
Tests installation of configuration objects in installation functionality.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testCollectionInstallationNoCollections() : void {
    // 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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.