You are here

protected function SplitTestTrait::getSplitPreviewStorage in Configuration Split 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/SplitTestTrait.php \Drupal\Tests\config_split\Kernel\SplitTestTrait::getSplitPreviewStorage()

Get the preview storage for a split.

Parameters

\Drupal\Core\Config\Config $config: The split config.

Return value

\Drupal\Core\Config\StorageInterface The storage.

4 calls to SplitTestTrait::getSplitPreviewStorage()
SplitMergeTest::testCompleteAndConditionalSplitExport in tests/src/Kernel/SplitMergeTest.php
Test complete and conditional split export.
SplitMergeTest::testConditionalSplitWithModuleConfig in tests/src/Kernel/SplitMergeTest.php
Test complete and conditional split export with modules.
SplitMergeTest::testIncludeDependency in tests/src/Kernel/SplitMergeTest.php
Test that dependencies are split too.
SplitMergeTest::testSimpleSplitExport in tests/src/Kernel/SplitMergeTest.php
Test a simple export split.

File

tests/src/Kernel/SplitTestTrait.php, line 80

Class

SplitTestTrait
Trait to facilitate creating split configurations.

Namespace

Drupal\Tests\config_split\Kernel

Code

protected function getSplitPreviewStorage(Config $config) : StorageInterface {

  // We cache it in its own memory storage so that it becomes decoupled.
  $memory = new MemoryStorage();

  // For now just get the source, there is no preview yet.
  $this
    ->copyConfig($this
    ->getSplitSourceStorage($config), $memory);
  return $memory;
}