public function ConfigImportLocaleTestBase::doExport in Locale: Config import 8
Perform a config export to sync. folder.
File
- tests/
src/ Functional/ ConfigImportLocaleTestBase.php, line 54
Class
- ConfigImportLocaleTestBase
- Class ConfigIgnoreBrowserTestBase.
Namespace
Drupal\Tests\config_import_locale\FunctionalCode
public function doExport() {
// Setup a config sync. dir with a, more or less, know set of config
// entities. This is a full blown export of yaml files, written to the disk.
$destination_dir = Settings::get('config_sync_directory');
/** @var \Drupal\Core\Config\CachedStorage $source_storage */
$source_storage = \Drupal::service('config.storage');
$destination_storage = new FileStorage($destination_dir);
foreach ($source_storage
->listAll() as $name) {
$destination_storage
->write($name, $source_storage
->read($name));
}
}