// 'composer install' and see if the scaffold file is re-scaffolded.
@
unlink($sut . '/sites/default/default.settings.php'
);
$this->
assertFileDoesNotExist($sut . '/sites/default/default.settings.php'
);
$this->
mustExec("composer drupal:scaffold --no-ansi",
$sut);
$this->
assertScaffoldedFile($sut . '/sites/default/default.settings.php', FALSE, 'scaffolded from the scaffold-override-fixture'
);
// Run 'composer create-project' to create a new test project called
// 'create-project-test', which is a copy of 'fixtures/drupal-drupal'.
$sut =
$this->fixturesDir . '/create-project-test';
$filesystem =
new Filesystem();
$filesystem->
remove($sut);
$stdout =
$this->
mustExec("composer create-project --repository=packages.json fixtures/drupal-drupal {
$sut}",
$this->fixturesDir,
['COMPOSER_MIRROR_PATH_REPOS' => 1
]);
$this->
assertDirectoryExists($sut);
$this->
assertStringContainsString('Scaffolding files for fixtures/drupal-drupal',
$stdout);
$this->
assertScaffoldedFile($sut . '/index.php', FALSE, 'Test version of index.php from drupal/core'
);
} /**
* Tests to see if scaffold messages are omitted when running scaffold twice.
*/
public function testScaffoldMessagesDoNotPrintTwice() { $topLevelProjectDir = 'drupal-drupal';
$sut =
$this->fixturesDir . '/' .
$topLevelProjectDir;
// First test: run composer install. This is the same as composer update