function BuildTestBase::getWorkingPath

Same name and namespace in other branches
  1. 9 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getWorkingPath()
  2. 10 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getWorkingPath()
  3. 11.x core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::getWorkingPath()

Get the working directory within the workspace, creating if necessary.

Parameters

string $working_dir: The path within the workspace directory.

Return value

string The full path to the working directory within the workspace directory.

2 calls to BuildTestBase::getWorkingPath()
BuildTestBase::copyCodebase in core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
Copy the current working codebase into a workspace.
BuildTestBase::instantiateServer in core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
Do the work of making a server process.

File

core/tests/Drupal/BuildTests/Framework/BuildTestBase.php, line 203

Class

BuildTestBase
Provides a workspace to test build processes.

Namespace

Drupal\BuildTests\Framework

Code

protected function getWorkingPath($working_dir = NULL) {
    $full_path = $this->getWorkspaceDirectory();
    if ($working_dir) {
        $full_path .= '/' . $working_dir;
    }
    if (!file_exists($full_path)) {
        $fs = new SymfonyFilesystem();
        $fs->mkdir($full_path);
    }
    return $full_path;
}

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