function RecipeFinderTest::testForbiddenMethods
Tests that certain configuration options are disallowed.
Attributes
#[TestWith([
'name',
[
'alternate.yml',
],
'Recipe discovery can only scan for files named `recipe.yml`.',
])]
#[TestWith([
'depth',
[
2,
],
'Recipe discovery cannot recurse into the file system.',
])]
#[TestWith([
'directories',
[],
'Recipe discovery can only scan for files.',
])]
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeFinderTest.php, line 40
Class
- RecipeFinderTest
- Tests the recipe finder.
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testForbiddenMethods(string $method, array $arguments, string $expected_exception) : void {
$this->expectException(\LogicException::class);
$this->expectExceptionMessage($expected_exception);
$finder = new Finder($this->root . '/core/recipes');
$finder->{$method}(...$arguments);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.