$sut =
$this->fixturesDir . '/' .
$fixture_name;
$replacements =
['SYMLINK' => 'false', 'PROJECT_ROOT' =>
$this->projectRoot
];
$this->fixtures->
cloneFixtureProjects($this->fixturesDir,
$replacements);
// .gitignore files will not be managed unless there is a git repository.
$this->
mustExec('git init',
$sut);
// Add some user info so git does not complain.
$this->
mustExec('git config user.email "test@example.com"',
$sut);
$this->
mustExec('git config user.name "Test User"',
$sut);
$this->
mustExec('git add .',
$sut);
$this->
mustExec('git commit -m "Initial commit."',
$sut);
// Run composer install, but suppress scaffolding.
$this->fixtures->
runComposer("install --no-ansi --no-scripts --no-plugins",
$sut);
return $sut;
} /**
* Tests scaffold command correctly manages the .gitignore file.
*/
public function testManageGitIgnore() { // Note that the drupal-composer-drupal-project fixture does not
// have any configuration settings related to .gitignore management.
$sut =
$this->
createSutWithGit('drupal-composer-drupal-project'
);
$this->
assertFileDoesNotExist($sut . '/docroot/autoload.php'
);