function ConfigImporterTest::testIsInstallable

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php \Drupal\KernelTests\Core\Config\ConfigImporterTest::testIsInstallable()
  2. 10 core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php \Drupal\KernelTests\Core\Config\ConfigImporterTest::testIsInstallable()
  3. 11.x core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php \Drupal\KernelTests\Core\Config\ConfigImporterTest::testIsInstallable()

Tests the isInstallable method()

File

core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php, line 523

Class

ConfigImporterTest
Tests importing configuration from files into active configuration.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testIsInstallable() {
    $config_name = 'config_test.dynamic.isinstallable';
    $this->assertFalse($this->container
        ->get('config.storage')
        ->exists($config_name));
    \Drupal::state()->set('config_test.isinstallable', TRUE);
    $this->installConfig([
        'config_test',
    ]);
    $this->assertTrue($this->container
        ->get('config.storage')
        ->exists($config_name));
}

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