function SymlinkValidatorTest::testHardLinks
Tests that hard links are not supported.
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ SymlinkValidatorTest.php, line 45
Class
- SymlinkValidatorTest
- @covers \Drupal\package_manager\Validator\SymlinkValidator @group package_manager @internal
Namespace
Drupal\Tests\package_manager\KernelCode
public function testHardLinks() : void {
$project_root = $this->container
->get(PathLocator::class)
->getProjectRoot();
link($project_root . '/composer.json', $project_root . '/composer.link');
$result = ValidationResult::createError([
t('The %which directory at %dir contains hard links, which is not supported. The first one is %file.', [
'%which' => 'active',
'%dir' => $project_root,
'%file' => $project_root . '/composer.json',
]),
]);
$this->assertStatusCheckResults([
$result,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.