Skip to content
Snippets Groups Projects

Unskip test

1 file
+ 3
6
Compare changes
  • Side-by-side
  • Inline
@@ -54,10 +54,6 @@ protected function setUp(): void {
* Tests upgrading the Composer Scaffold plugin.
*/
public function testScaffoldUpgrade(): void {
$composerVersionLine = exec('composer --version');
if (str_contains($composerVersionLine, 'Composer version 2')) {
$this->markTestSkipped('We cannot run the scaffold upgrade test with Composer 2 until we have a stable version of drupal/core-composer-scaffold to start from that we can install with Composer 2.x.');
}
$this->fixturesDir = $this->fixtures->tmpDir($this->name());
$replacements = ['SYMLINK' => 'false', 'PROJECT_ROOT' => $this->fixtures->projectRoot()];
$this->fixtures->cloneFixtureProjects($this->fixturesDir, $replacements);
@@ -73,8 +69,9 @@ public function testScaffoldUpgrade(): void {
// Packagist is disabled in the fixture; we bring it back by removing the
// line that disables it.
$this->mustExec("composer config --unset repositories.packagist.org", $sut);
$stdout = $this->mustExec("composer require --no-ansi drupal/core-composer-scaffold:8.8.0 --no-plugins 2>&1", $sut);
$this->assertStringContainsString(" - Installing drupal/core-composer-scaffold (8.8.0):", $stdout);
$this->mustExec("composer config --unset repositories.composer-scaffold", $sut);
$stdout = $this->mustExec("composer require --no-ansi drupal/core-composer-scaffold:9.5.0 --no-plugins 2>&1", $sut);
$this->assertStringContainsString(" - Installing drupal/core-composer-scaffold (9.5.0):", $stdout);
// We can't force the path repo to re-install over the stable version
// without removing it, and removing it masks the bugs we are testing for.
Loading