function Fixtures::tmpDir

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

Overrides FixturesBase::tmpDir

File

core/tests/Drupal/Tests/Composer/Plugin/Unpack/Fixtures.php, line 31

Class

Fixtures
Fixture for testing the unpack composer plugin.

Namespace

Drupal\Tests\Composer\Plugin\Unpack

Code

public function tmpDir(string $prefix) : string {
    $prefix .= static::persistentPrefix();
    $tmpDir = sys_get_temp_dir() . '/unpack-' . $prefix . uniqid(md5($prefix . microtime()), TRUE);
    $this->tmpDirs[] = $tmpDir;
    return $tmpDir;
}

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