function RecipeFinderTest::testDiscoveryFollowsSymlinks
Tests that the recipe finder follows symlinks.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeFinderTest.php, line 188
Class
- RecipeFinderTest
- Tests the recipe finder.
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testDiscoveryFollowsSymlinks() : void {
$cookbook_dir = $this->createTemporaryDirectory();
$target = $this->root . '/core/recipes/administrator_role';
(new SymfonyFilesystem())->symlink($target, $cookbook_dir . '/recipe_link');
$recipes = iterator_to_array(new Finder($cookbook_dir));
$this->assertCount(1, $recipes);
$this->assertSame('Administrator role', reset($recipes)->name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.