You are here

protected function ScaffoldTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Functional\ScaffoldTest::setUp()
  2. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Functional\ScaffoldTest::setUp()

File

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php, line 56

Class

ScaffoldTest
Tests Composer Scaffold.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold\Functional

Code

protected function setUp() : void {
  $this->fileSystem = new Filesystem();
  $this->fixtures = new Fixtures();
  $this->fixtures
    ->createIsolatedComposerCacheDir();
  $this->projectRoot = $this->fixtures
    ->projectRoot();

  // The directory used for creating composer projects to test can be
  // configured using the SCAFFOLD_FIXTURE_DIR environment variable. Otherwise
  // a directory will be created in the system's temporary directory.
  $this->fixturesDir = getenv('SCAFFOLD_FIXTURE_DIR');
  if (!$this->fixturesDir) {
    $this->fixturesDir = $this->fixtures
      ->tmpDir($this
      ->getName());
  }
}