public function ManageGitIgnoreTest::testUnmanagedGitIgnoreWhenDisabled in Drupal 9
Same name and namespace in other branches
- 8 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 148
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
->assertFileDoesNotExist($sut . '/docroot/autoload.php');
$this
->assertFileDoesNotExist($sut . '/docroot/index.php');
// Run the scaffold command.
$this->fixtures
->runScaffold($sut);
$this
->assertFileExists($sut . '/autoload.php');
$this
->assertFileExists($sut . '/index.php');
$this
->assertFileDoesNotExist($sut . '/.gitignore');
$this
->assertFileDoesNotExist($sut . '/docroot/sites/default/.gitignore');
}