function SandboxManagerBaseTest::testFailureCollectPathsToExclude
Tests that if a stage fails to get paths to exclude, throws a stage exception.
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ SandboxManagerBaseTest.php, line 426
Class
- SandboxManagerBaseTest
- @coversDefaultClass \Drupal\package_manager\SandboxManagerBase @group package_manager @group #slow @internal
Namespace
Drupal\Tests\package_manager\KernelCode
public function testFailureCollectPathsToExclude() : void {
$project_root = $this->container
->get(PathLocator::class)
->getProjectRoot();
unlink($project_root . '/composer.json');
$this->expectException(SandboxException::class);
$this->expectExceptionMessage("composer.json not found.");
$this->createStage()
->create();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.