function RecipeTest::testCreateFromDirectoryNoRecipe
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testCreateFromDirectoryNoRecipe()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeTest.php, line 39
Class
- RecipeTest
- @coversDefaultClass \Drupal\Core\Recipe\Recipe @group Recipe
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.