class InstallerExistingInstallationTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php \Drupal\FunctionalTests\Installer\InstallerExistingInstallationTest

Tests the installer with an existing Drupal installation.

@group Installer

Hierarchy

Expanded class hierarchy of InstallerExistingInstallationTest

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php, line 10

Namespace

Drupal\FunctionalTests\Installer
View source
class InstallerExistingInstallationTest extends InstallerTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * Tests that Drupal fails to install when there is an existing installation.
   */
  public function testInstaller() {
    // Verify that Drupal can't be immediately reinstalled.
    $this->visitInstaller();
    $this->assertSession()
      ->pageTextContains('Drupal already installed');
    // Delete settings.php and attempt to reinstall again.
    unlink($this->siteDirectory . '/settings.php');
    $this->visitInstaller();
    $this->setUpLanguage();
    $this->setUpProfile();
    $this->setUpRequirementsProblem();
    $this->setUpSettings();
    $this->assertSession()
      ->pageTextContains('Drupal already installed');
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.