1 config.test public ConfigurationUITest::copyConfig($source = 'active', $target = 'staging')

Copies configuration objects from source storage to target storage.

Parameters

string $source: The source config storage name.

string $target: The target config storage name.

File

core/modules/config/tests/config.test, line 578
Tests for Configuration module.

Class

ConfigurationUITest
Tests the UI for syncing, importing, and exporting.

Code

public function copyConfig($source = 'active', $target = 'staging') {
  $source_storage = config_get_config_storage($source);
  $target_storage = config_get_config_storage($target);
  $target_storage->deleteAll();
  foreach ($source_storage->listAll() as $name) {
    $target_storage->write($name, $source_storage->read($name));
  }
}