You are here

public function Fixtures::mkTmpDir in Drupal 9

Same name and namespace in other branches
  1. 8 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;
}