public function ManageGitIgnoreTest::testUnmanagedGitIgnoreWhenDisabled in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Functional\ManageGitIgnoreTest::testUnmanagedGitIgnoreWhenDisabled()
- 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Functional\ManageGitIgnoreTest::testUnmanagedGitIgnoreWhenDisabled()
Tests scaffold command does not manage the .gitignore file when disabled.
File
- core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Scaffold/ Functional/ ManageGitIgnoreTest.php, line 150
Class
- ManageGitIgnoreTest
- Tests to see whether .gitignore files are correctly managed.
Namespace
Drupal\Tests\Composer\Plugin\Scaffold\FunctionalCode
public function testUnmanagedGitIgnoreWhenDisabled() {
// Note that the drupal-drupal fixture has a configuration setting
// `"gitignore": false,` which disables .gitignore file handling.
$sut = $this
->createSutWithGit('drupal-drupal');
$this
->assertFileNotExists($sut . '/docroot/autoload.php');
$this
->assertFileNotExists($sut . '/docroot/index.php');
// Run the scaffold command.
$this->fixtures
->runScaffold($sut);
$this
->assertFileExists($sut . '/autoload.php');
$this
->assertFileExists($sut . '/index.php');
$this
->assertFileNotExists($sut . '/.gitignore');
$this
->assertFileNotExists($sut . '/docroot/sites/default/.gitignore');
}