public function ManageGitIgnoreTest::testAppendToEmptySettingsIsUnmanaged 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::testAppendToEmptySettingsIsUnmanaged()
- 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ManageGitIgnoreTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Functional\ManageGitIgnoreTest::testAppendToEmptySettingsIsUnmanaged()
Test appending to an unmanaged file, and confirm it is not .gitignored.
If we append to an unmanaged (not scaffolded) file, and we are managing .gitignore files, then we expect that the unmanaged file should not be added to the .gitignore file, because unmanaged files should be committed.
File
- core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Scaffold/ Functional/ ManageGitIgnoreTest.php, line 171
Class
- ManageGitIgnoreTest
- Tests to see whether .gitignore files are correctly managed.
Namespace
Drupal\Tests\Composer\Plugin\Scaffold\FunctionalCode
public function testAppendToEmptySettingsIsUnmanaged() {
$sut = $this
->createSutWithGit('drupal-drupal-append-settings');
$this
->assertFileNotExists($sut . '/autoload.php');
$this
->assertFileNotExists($sut . '/index.php');
$this
->assertFileNotExists($sut . '/sites/.gitignore');
// Run the scaffold command.
$this->fixtures
->runScaffold($sut);
$this
->assertFileExists($sut . '/autoload.php');
$this
->assertFileExists($sut . '/index.php');
$this
->assertScaffoldedFile($sut . '/sites/.gitignore', FALSE, 'example.sites.php');
$this
->assertScaffoldedFileDoesNotContain($sut . '/sites/.gitignore', 'settings.php');
}