function RecipeTest::testCreateFromDirectory2

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testCreateFromDirectory2()

@testWith ["no_extensions", "No extensions" , "Testing", [], "A recipe description"] ["install_two_modules", "Install two modules" , "Content type", ["filter", "text", "node"], ""]

File

core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php, line 31

Class

RecipeTest
@coversDefaultClass \Drupal\Core\Recipe\Recipe @group Recipe

Namespace

Drupal\KernelTests\Core\Recipe

Code

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.