function FixtureUtilityTrait::copyFixtureFilesTo
Mirrors a fixture directory to the given path.
Files not in the source fixture directory will not be deleted from destination directory. After copying the files to the destination directory the files and folders will be converted so that can be used in the tests. The conversion includes:
- Renaming '_git' directories to '.git'
- Renaming files ending in '.info.yml.hide' to remove '.hide'.
Parameters
string $source_path: The source path.
string $destination_path: The path to which the fixture files should be mirrored.
3 calls to FixtureUtilityTrait::copyFixtureFilesTo()
- PackageManagerKernelTestBase::createTestProject in core/
modules/ package_manager/ tests/ src/ Kernel/ PackageManagerKernelTestBase.php - Creates a test project.
- PackageUpdateTest::testPackageUpdate in core/
modules/ package_manager/ tests/ src/ Build/ PackageUpdateTest.php - Tests updating packages in a stage directory.
- TemplateProjectTestBase::copyFixtureToTempDirectory in core/
modules/ package_manager/ tests/ src/ Build/ TemplateProjectTestBase.php - Copies a fixture directory to a temporary directory and returns its path.
File
-
core/
modules/ package_manager/ tests/ src/ Traits/ FixtureUtilityTrait.php, line 32
Class
- FixtureUtilityTrait
- A utility for all things fixtures.
Namespace
Drupal\Tests\package_manager\TraitsCode
protected static function copyFixtureFilesTo(string $source_path, string $destination_path) : void {
(new Filesystem())->mirror($source_path, $destination_path, NULL, [
'override' => TRUE,
'delete' => FALSE,
]);
static::renameInfoYmlFiles($destination_path);
static::renameGitDirectories($destination_path);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.