function Fixtures::runScaffold

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::runScaffold()
  2. 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::runScaffold()
  3. 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::runScaffold()

Runs the scaffold operation.

This is equivalent to running `composer composer-scaffold`, but we do the equivalent operation by instantiating a Handler object in order to continue running in the same process, so that coverage may be calculated for the code executed by these tests.

Parameters

string $cwd: The working directory to run the scaffold command in.

Return value

string Output captured from tests that write to Fixtures::io().

File

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php, line 366

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

public function runScaffold($cwd) {
    chdir($cwd);
    $handler = new Handler($this->getComposer(), $this->io());
    $handler->scaffold();
    return $this->getOutput();
}

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