function RecipeTest::testExtra
Tests getting extra extension-specific info from a recipe.
@covers ::getExtra
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeTest.php, line 106
Class
- RecipeTest
- @coversDefaultClass \Drupal\Core\Recipe\Recipe @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testExtra() : void {
$recipe = $this->createRecipe([
'name' => 'Getting extra info',
'extra' => [
'special_sauce' => 'Wasabi',
],
]);
$this->assertSame('Wasabi', $recipe->getExtra('special_sauce'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.