You are here

public function ConfigurationImportTestCase::testImportToActiveStore in Configuration Management 7.2

File

tests/configuration.test, line 240
Tests for Configuration Management

Class

ConfigurationImportTestCase
Base class for functional tests for configuration management.

Code

public function testImportToActiveStore() {

  // Change the path from where the configurations are loaded.
  $source = drupal_get_path('module', 'configuration') . '/tests/test_configs/';
  $results = ConfigurationManagement::importToActiveStore(array(
    'content_type.article',
  ), TRUE, TRUE, FALSE, $source);
  $imported = $results
    ->getInfo('imported');
  foreach ($this->configurations as $config) {
    $this
      ->assertTrue(in_array($config, $imported), "Configuration for {$config} was imported.");
  }
}