function Fixtures::mkTmpDir

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

Creates a temporary directory.

Parameters

string $prefix: A prefix for the temporary directory name.

Return value

string Path to temporary directory

2 calls to Fixtures::mkTmpDir()
Fixtures::createIsolatedComposerCacheDir in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
Create an isolated cache directory for Composer
Fixtures::getLocationReplacements in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php
Gets an Interpolator with 'web-root' and 'package-name' set.

File

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

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

public function mkTmpDir($prefix) {
    $tmpDir = $this->tmpDir($prefix);
    $filesystem = new Filesystem();
    $filesystem->ensureDirectoryExists($tmpDir);
    return $tmpDir;
}

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