runScaffold example


  public function scaffoldSut($fixture_name$is_link = FALSE, $relocated_docroot = TRUE) {
    $sut = $this->createSut($fixture_name['SYMLINK' => $is_link ? 'true' : 'false']);
    // Run composer install to get the dependencies we need to test.     $this->fixtures->runComposer("install --no-ansi --no-scripts --no-plugins", $sut);
    // Test drupal:scaffold.     $scaffoldOutput = $this->fixtures->runScaffold($sut);

    // Calculate the docroot directory and assert that our fixture layout     // matches what was stipulated in $relocated_docroot. Fail fast if     // the caller provided the wrong value.     $docroot = $sut;
    if ($relocated_docroot) {
      $docroot .= '/docroot';
      $this->assertFileExists($docroot);
    }
    else {
      $this->assertFileDoesNotExist($sut . '/docroot');
    }
/** * Tests scaffold command correctly manages the .gitignore file. */
  public function testManageGitIgnore() {
    // Note that the drupal-composer-drupal-project fixture does not     // have any configuration settings related to .gitignore management.     $sut = $this->createSutWithGit('drupal-composer-drupal-project');
    $this->assertFileDoesNotExist($sut . '/docroot/autoload.php');
    $this->assertFileDoesNotExist($sut . '/docroot/index.php');
    $this->assertFileDoesNotExist($sut . '/docroot/sites/.gitignore');
    // Run the scaffold command.     $this->fixtures->runScaffold($sut);
    $this->assertFileExists($sut . '/docroot/autoload.php');
    $this->assertFileExists($sut . '/docroot/index.php');
    $expected = <<<EOT /build /.csslintrc /.editorconfig /.eslintignore /.eslintrc.json /.gitattributes /.ht.router.php /autoload.php /index.php /robots.txt /update.php /web.config
Home | Imprint | This part of the site doesn't use cookies.