You are here

public function ConfigImporterTest::testConfigGetConfigDirectory 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::testConfigGetConfigDirectory()

Tests config_get_config_directory().

File

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

Class

ConfigImporterTest
Tests importing configuration from files into active configuration.

Namespace

Drupal\config\Tests

Code

public function testConfigGetConfigDirectory() {
  $directory = config_get_config_directory(CONFIG_SYNC_DIRECTORY);
  $this
    ->assertEqual($this->configDirectories[CONFIG_SYNC_DIRECTORY], $directory);
  $message = 'Calling config_get_config_directory() with CONFIG_ACTIVE_DIRECTORY results in an exception.';
  try {
    config_get_config_directory(CONFIG_ACTIVE_DIRECTORY);
    $this
      ->fail($message);
  } catch (\Exception $e) {
    $this
      ->pass($message);
  }
}