function RecipeFinderTest::createTemporaryDirectory
Creates a unique directory within the OS temporary directory.
This isolates directory scanning from other tests, which can add and remove directories in the OS temporary directory at the same time. The new directory is removed when the test ends.
2 calls to RecipeFinderTest::createTemporaryDirectory()
- RecipeFinderTest::testComposerRecipeDirectory in core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeFinderTest.php - Tests that the Composer recipe directory is read correctly.
- RecipeFinderTest::testDiscoveryFollowsSymlinks in core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeFinderTest.php - Tests that the recipe finder follows symlinks.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeFinderTest.php, line 205
Class
- RecipeFinderTest
- Tests the recipe finder.
Namespace
Drupal\KernelTests\Core\RecipeCode
private function createTemporaryDirectory() : string {
$directory = FileSystem::getOsTemporaryDirectory() . '/recipe_finder_test' . $this->databasePrefix;
$this->assertTrue(mkdir($directory));
$this->temporaryDirectory = $directory;
return $directory;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.