You are here

public function TestBase::copyConfig in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/TestBase.php \Drupal\simpletest\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.

30 calls to TestBase::copyConfig()
ConfigEntityImportTest::setUp in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Sets up a Drupal site for running functional and integration tests.
ConfigExportImportUITest::testExportImport in core/modules/config/src/Tests/ConfigExportImportUITest.php
Tests a simple site export import case.
ConfigImportAllTest::testInstallUninstall in core/modules/config/src/Tests/ConfigImportAllTest.php
Tests that a fixed set of modules can be installed and uninstalled.
ConfigImporterMissingContentTest::setUp in core/modules/config/src/Tests/ConfigImporterMissingContentTest.php
Performs setup tasks before each individual test method is run.
ConfigImporterTest::setUp in core/modules/config/src/Tests/ConfigImporterTest.php
Performs setup tasks before each individual test method is run.

... See full list

File

core/modules/simpletest/src/TestBase.php, line 1600
Contains \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));
  }
}