You are here

function ConfigImporterTest::testIsInstallable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config/src/Tests/ConfigImporterTest.php \Drupal\config\Tests\ConfigImporterTest::testIsInstallable()

Tests the isInstallable method()

File

core/modules/config/src/Tests/ConfigImporterTest.php, line 536
Contains \Drupal\config\Tests\ConfigImporterTest.

Class

ConfigImporterTest
Tests importing configuration from files into active configuration.

Namespace

Drupal\config\Tests

Code

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(array(
    'config_test',
  ));
  $this
    ->assertTrue($this->container
    ->get('config.storage')
    ->exists($config_name));
}