function SymlinkValidatorTest::testUnsupportedLinkUnderExcludedPath

Tests that unsupported links are excluded if they're under excluded paths.

@depends testAbsoluteSymlinks

@covers \Drupal\package_manager\PathExcluder\GitExcluder @covers \Drupal\package_manager\PathExcluder\NodeModulesExcluder

File

core/modules/package_manager/tests/src/Kernel/SymlinkValidatorTest.php, line 189

Class

SymlinkValidatorTest
@covers \Drupal\package_manager\Validator\SymlinkValidator @group package_manager @internal

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testUnsupportedLinkUnderExcludedPath() : void {
    $project_root = $this->container
        ->get(PathLocator::class)
        ->getProjectRoot();
    // Create absolute symlinks (which are not supported by Composer Stager) in
    // both `node_modules`, which is a regular directory, and `.git`, which is a
    // hidden directory.
    mkdir($project_root . '/node_modules');
    symlink($project_root . '/composer.json', $project_root . '/node_modules/composer.link');
    symlink($project_root . '/composer.json', $project_root . '/.git/composer.link');
    $this->assertStatusCheckResults([]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.