diff --git a/core/tests/Drupal/Tests/Component/Scaffold/Functional/ScaffoldTest.php b/core/tests/Drupal/Tests/Component/Scaffold/Functional/ScaffoldTest.php index 12e93633b9..8046662f16 100644 --- a/core/tests/Drupal/Tests/Component/Scaffold/Functional/ScaffoldTest.php +++ b/core/tests/Drupal/Tests/Component/Scaffold/Functional/ScaffoldTest.php @@ -120,7 +120,8 @@ public function scaffoldSut($fixture_name, $is_link = FALSE, $relocated_docroot if ($relocated_docroot) { $docroot .= '/docroot'; $this->assertFileExists($docroot); - } else { + } + else { $this->assertFileNotExists($sut . '/docroot'); } @@ -196,27 +197,36 @@ public function testProjectThatScaffoldsEmptyProject() { $this->assertCommonDrupalAssetsWereScaffolded($docroot, $is_link); } - /** - * Asserts that the drupal/assets scaffold files correct for drupal/project. - */ - public function testDrupalProjectSutWasScaffolded() { - $fixture_name = 'drupal-composer-drupal-project'; - $is_link = true; - $relocated_docroot = true; - list($docroot, $scaffoldOutput) = $this->scaffoldSut($fixture_name, $is_link, $relocated_docroot); + public function scaffoldOverridingSettingsExcludingHtaccessValues() { + return [ + [ + 'drupal-composer-drupal-project', + TRUE, + TRUE, + ], - $this->assertCommonDrupalAssetsWereScaffolded($docroot, $is_link); - $this->assertDefaultSettingsFromScaffoldOverride($docroot, $is_link); - $this->assertHtaccessExcluded($docroot); + [ + 'drupal-drupal', + FALSE, + FALSE, + ], + ]; } /** - * Asserts that the drupal/assets scaffold files correct for drupal/drupal. + * Asserts that the drupal/assets scaffold files correct for drupal/project and drupal/drupal. + * + * @param string $fixture_name + * The name of the fixture to use from + * core/tests/Drupal/Tests/Component/Scaffold/fixtures. + * @param bool $is_link + * Whether to use symlinks for 'replace' operations. + * @param bool $relocated_docroot + * Whether the named fixture has a relocated document root. + * + * @dataProvider scaffoldOverridingSettingsExcludingHtaccessValues */ - public function testDrupalDrupalSutWasScaffolded() { - $fixture_name = 'drupal-drupal'; - $is_link = FALSE; - $relocated_docroot = FALSE; + public function testScaffoldOverridingSettingsExcludingHtaccess($fixture_name, $is_link, $relocated_docroot) { list($docroot, $scaffoldOutput) = $this->scaffoldSut($fixture_name, $is_link, $relocated_docroot); $this->assertCommonDrupalAssetsWereScaffolded($docroot, $is_link); @@ -272,7 +282,7 @@ protected function scaffoldAppendTestValuesToPermute($is_link) { 'drupal-drupal-append-to-append', $is_link, '#in drupal-drupal-append-to-append composer.json fixture.*This content is prepended to the top of the existing robots.txt fixture.*Test version of robots.txt from drupal/core.*This content is appended to the bottom of the existing robots.txt fixture.*in profile-with-append composer.json fixture.*This content is appended to the bottom of the existing robots.txt fixture.*in drupal-drupal-append-to-append composer.json fixture#ms', - ] + ], ]; } diff --git a/core/tests/Drupal/Tests/Component/Scaffold/fixtures/scripts/disable-git-bin/git b/core/tests/Drupal/Tests/Component/Scaffold/fixtures/scripts/disable-git-bin/git old mode 100644 new mode 100755