function TemplateProjectTestBase::copyCodebase
Copy the current working codebase into a workspace.
Use this method to copy the current codebase, including any patched changes, into the workspace.
By default, the copy will exclude site-specific and build-related files and directories. Use the $iterator parameter to override this behavior.
Parameters
\Iterator|null $iterator: (optional) An iterator of all the files to copy. Default behavior is to exclude site-specific directories and files.
string|null $working_dir: (optional) Relative path within the test workspace file system that will contain the copy of the codebase. Defaults to the workspace directory.
Overrides BuildTestBase::copyCodebase
1 call to TemplateProjectTestBase::copyCodebase()
- TemplateProjectTestBase::createTestProject in core/
modules/ package_manager/ tests/ src/ Build/ TemplateProjectTestBase.php - Creates a test project from a given template and installs Drupal.
File
-
core/
modules/ package_manager/ tests/ src/ Build/ TemplateProjectTestBase.php, line 732
Class
- TemplateProjectTestBase
- Base class for tests which create a test site from a core project template.
Namespace
Drupal\Tests\package_manager\BuildCode
public function copyCodebase(?\Iterator $iterator = NULL, $working_dir = NULL) : void {
parent::copyCodebase($iterator, $working_dir);
// Create a local Composer repository for all third-party dependencies and
// core packages.
$this->createVendorRepository();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.