You are here

public function ConfigurationImportTestCase::testImportOldVersionToActiveStore in Configuration Management 7.2

File

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

Class

ConfigurationImportTestCase
Base class for functional tests for configuration management.

Code

public function testImportOldVersionToActiveStore() {

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