function RecipeTest::testCreateFromDirectory2
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testCreateFromDirectory2()
- 10 core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testCreateFromDirectory2()
Tests create from directory 2.
Attributes
#[TestWith([
"no_extensions",
"No extensions",
"Testing",
[],
"A recipe description",
])]
#[TestWith([
"install_two_modules",
"Install two modules",
"Content type",
[
"filter",
"text",
"node",
],
"",
])]
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeTest.php, line 36
Class
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testCreateFromDirectory2(string $recipe_name, string $expected_name, string $expected_type, array $expected_modules, string $expected_description) : void {
$recipe = Recipe::createFromDirectory('core/tests/fixtures/recipes/' . $recipe_name);
$this->assertSame($expected_name, $recipe->name);
$this->assertSame($expected_type, $recipe->type);
$this->assertSame($expected_modules, $recipe->install->modules);
$this->assertSame($expected_description, $recipe->description);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.