function ConfigConfiguratorTest::cloneRecipe

Clones a recipes.

3 calls to ConfigConfiguratorTest::cloneRecipe()
ConfigConfiguratorTest::testExistingConfigIsIgnoredInLenientMode in core/tests/Drupal/KernelTests/Core/Recipe/ConfigConfiguratorTest.php
@testWith [false][[api-linebreak]] [[]][[api-linebreak]] [[api-linebreak]]
ConfigConfiguratorTest::testFullStrictness in core/tests/Drupal/KernelTests/Core/Recipe/ConfigConfiguratorTest.php
Tests strict mode.
ConfigConfiguratorTest::testSelectiveStrictness in core/tests/Drupal/KernelTests/Core/Recipe/ConfigConfiguratorTest.php
Tests with strict mode on part of the configuration.

File

core/tests/Drupal/KernelTests/Core/Recipe/ConfigConfiguratorTest.php, line 165

Class

ConfigConfiguratorTest
@covers \Drupal\Core\Recipe\ConfigConfigurator[[api-linebreak]] @group Recipe

Namespace

Drupal\KernelTests\Core\Recipe

Code

private function cloneRecipe(string $original_dir) : string {
  // Clone the recipe into the virtual file system.
  $name = uniqid();
  $clone_dir = $this->vfsRoot
    ->url() . '/' . $name;
  mkdir($clone_dir);
  $clone_dir = $this->vfsRoot
    ->getChild($name);
  vfsStream::copyFromFileSystem($original_dir, $clone_dir);
  return $clone_dir->url();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.