function ComponentsIsolatedBuildTest::testComponentComposerJson
Same name in other branches
- 10 core/tests/Drupal/BuildTests/Composer/Component/ComponentsIsolatedBuildTest.php \Drupal\BuildTests\Composer\Component\ComponentsIsolatedBuildTest::testComponentComposerJson()
- 11.x core/tests/Drupal/BuildTests/Composer/Component/ComponentsIsolatedBuildTest.php \Drupal\BuildTests\Composer\Component\ComponentsIsolatedBuildTest::testComponentComposerJson()
Test whether components' composer.json can be installed in isolation.
@dataProvider provideComponentPaths
File
-
core/
tests/ Drupal/ BuildTests/ Composer/ Component/ ComponentsIsolatedBuildTest.php, line 47
Class
- ComponentsIsolatedBuildTest
- Try to install dependencies per component, using Composer.
Namespace
Drupal\BuildTests\Composer\ComponentCode
public function testComponentComposerJson(string $component_path) : void {
// Only copy the components. Copy all of them because some of them depend on
// each other.
$finder = $this->getCodebaseFinder();
$finder->in($this->getDrupalRoot() . static::$componentsPath);
$this->copyCodebase($finder->getIterator());
$working_dir = $this->getWorkingPath() . static::$componentsPath . $component_path;
// We add path repositories so we can wire internal dependencies together.
$this->addExpectedRepositories($working_dir);
// Perform the installation.
$this->executeCommand("composer install --working-dir={$working_dir} --no-interaction --no-progress");
$this->assertCommandSuccessful();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.