You are here

public function ConfigurationApiTest::testExportToDatastore in Configuration Management 7.2

File

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

Class

ConfigurationApiTest

Code

public function testExportToDatastore() {
  $results = ConfigurationManagement::exportToDataStore(array(
    'content_type.article',
  ));
  $exported = $results
    ->getInfo('exported');
  foreach ($this->configurations as $config) {
    $this
      ->assertTrue(in_array($config, $exported), "Configuration for {$config} was exported.");
  }
  $count_tracked = db_query("SELECT COUNT(component) FROM {configuration_tracked}")
    ->fetchField();
  $this
    ->assertTrue(empty($count_tracked), "No configurations have been tracked.");
}