function 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 152  
Class
- ManageGitIgnoreTest
 - Tests to see whether .gitignore files are correctly managed.
 
Namespace
Drupal\Tests\Composer\Plugin\Scaffold\FunctionalCode
public function testUnmanagedGitIgnoreWhenDisabled() : void {
  // 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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.