function RecipeTest::testCreateFromDirectoryNoRecipe
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testCreateFromDirectoryNoRecipe()
- 10 core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testCreateFromDirectoryNoRecipe()
Tests creating a recipe from an empty directory.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeTest.php, line 49
Class
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testCreateFromDirectoryNoRecipe() : void {
$dir = uniqid('public://');
mkdir($dir);
$this->expectException(RecipeFileException::class);
$this->expectExceptionMessage('There is no ' . $dir . '/recipe.yml file');
Recipe::createFromDirectory($dir);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.