function UnpackRecipeTest::testComposerCreateProject
Tests that recipes are unpacked when using `composer create-project`.
File
-
core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Unpack/ Functional/ UnpackRecipeTest.php, line 568
Class
- UnpackRecipeTest
- Tests recipe unpacking.
Namespace
Drupal\Tests\Composer\Plugin\Unpack\FunctionalCode
public function testComposerCreateProject() : void {
// Prepare the project to use for create-project.
$root_project_path = $this->fixturesDir . '/composer-root';
$this->runComposer('require --verbose --no-install fixtures/recipe-a');
$stdOut = $this->runComposer('create-project --repository=\'{"type": "path","url": "' . $root_project_path . '","options": {"symlink": false}}\' fixtures/root composer-root2 -s dev', $this->fixturesDir);
// The recipes depended upon by the project, even indirectly, should all
// have been unpacked.
$this->assertSame("fixtures/recipe-b unpacked.\nfixtures/recipe-a unpacked.\n", $stdOut);
$this->doTestRecipeAUnpacked($this->fixturesDir . '/composer-root2', $stdOut);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.