function UnknownPathExcluderTest::testPathRepositoriesAreIncluded

Same name and namespace in other branches
  1. 11.x core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php \Drupal\Tests\package_manager\Kernel\PathExcluder\UnknownPathExcluderTest::testPathRepositoriesAreIncluded()

Tests that path repositories are included.

File

core/modules/package_manager/tests/src/Kernel/PathExcluder/UnknownPathExcluderTest.php, line 241

Class

UnknownPathExcluderTest
Tests Unknown Path Excluder.

Namespace

Drupal\Tests\package_manager\Kernel\PathExcluder

Code

public function testPathRepositoriesAreIncluded() : void {
  $this->createTestProjectForTemplate(TRUE);
  $project_root = $this->container
    ->get(PathLocator::class)
    ->getProjectRoot();
  $this->assertDirectoryExists($project_root . '/custom');
  $stage = $this->createStage();
  $stage->create();
  $this->assertDirectoryExists($stage->getSandboxDirectory() . '/custom');
  $stage->require([
    'ext-json:*',
  ]);
  $stage->apply();
  $this->assertDirectoryExists($project_root . '/custom');
}

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