public function TestBase::copyConfig

Copies configuration objects from source storage to target storage.

Parameters

\Drupal\Core\Config\StorageInterface $source_storage: The source config storage service.

\Drupal\Core\Config\StorageInterface $target_storage: The target config storage service.

6 calls to TestBase::copyConfig()

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php, line 1323
Definition of Drupal\simpletest\TestBase.

Class

TestBase
Base class for Drupal tests.

Namespace

Drupal\simpletest

Code

public function copyConfig(StorageInterface $source_storage, StorageInterface $target_storage) {
  $target_storage
    ->deleteAll();
  foreach ($source_storage
    ->listAll() as $name) {
    $target_storage
      ->write($name, $source_storage
      ->read($name));
  }
}