// project is "allowed" in our main fixture project, but not required.
// We expect that requiring this library should re-scaffold, resulting
// in a changed default.settings.php file.
$stdout =
$this->
mustExec("composer require --no-ansi --no-interaction fixtures/drupal-assets-fixture:dev-main fixtures/scaffold-override-fixture:dev-main",
$sut);
$this->
assertScaffoldedFile($sut . '/sites/default/default.settings.php', FALSE, 'scaffolded from the scaffold-override-fixture'
);
// Make sure that the appropriate notice informing us that scaffolding
// is allowed was printed.
$this->
assertStringContainsString('Package fixtures/scaffold-override-fixture has scaffold operations, and is already allowed in the root-level composer.json file.',
$stdout);
// Delete one scaffold file, just for test purposes, then run
// 'composer update' and see if the scaffold file is replaced.
@
unlink($sut . '/sites/default/default.settings.php'
);
$this->
assertFileDoesNotExist($sut . '/sites/default/default.settings.php'
);
$this->
mustExec("composer update --no-ansi",
$sut);
$this->
assertScaffoldedFile($sut . '/sites/default/default.settings.php', FALSE, 'scaffolded from the scaffold-override-fixture'
);
// Delete the same test scaffold file again, then run
// 'composer drupal:scaffold' 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 install --no-ansi",
$sut);
$this->
assertScaffoldedFile($sut . '/sites/default/default.settings.php', FALSE, 'scaffolded from the scaffold-override-fixture'
);
// Delete the same test scaffold file yet again, then run
// 'composer install' and see if the scaffold file is re-scaffolded.