createIsolatedComposerCacheDir example


  protected $fixtures;

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

  /** * {@inheritdoc} */
  protected function tearDown(): void {
    // Remove any temporary directories et. al. that were created.     $this->fixtures->tearDown();
  }

  

  protected $fixtures;

  /** * {@inheritdoc} */
  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());
    }
  }

  /** * {@inheritdoc} */

  protected string $fixturesDir;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    $this->fixtures = new Fixtures();
    $this->fixtures->createIsolatedComposerCacheDir();
  }

  /** * Tests upgrading the Composer Scaffold plugin. */
  public function testScaffoldUpgrade() {
    $composerVersionLine = exec('composer --version');
    if (str_contains($composerVersionLine, 'Composer version 2')) {
      $this->markTestSkipped('We cannot run the scaffold upgrade test with Composer 2 until we have a stable version of drupal/core-composer-scaffold to start from that we can install with Composer 2.x.');
    }
    $this->fixturesDir = $this->fixtures->tmpDir($this->getName());
    

  protected $fixtures;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->fileSystem = new Filesystem();
    $this->fixtures = new Fixtures();
    $this->fixtures->createIsolatedComposerCacheDir();
    $this->fixturesDir = $this->fixtures->tmpDir($this->getName());
    $replacements = ['SYMLINK' => 'false', 'PROJECT_ROOT' => $this->fixtures->projectRoot()];
    $this->fixtures->cloneFixtureProjects($this->fixturesDir, $replacements);
  }

  /** * {@inheritdoc} */
  protected function tearDown(): void {
    // Remove any temporary directories et. al. that were created.     $this->fixtures->tearDown();

    
Home | Imprint | This part of the site doesn't use cookies.