You are here

public function InstallerExistingInstallationTest::testInstaller in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php \Drupal\FunctionalTests\Installer\InstallerExistingInstallationTest::testInstaller()
  2. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php \Drupal\FunctionalTests\Installer\InstallerExistingInstallationTest::testInstaller()

Verifies that Drupal can't be reinstalled while an existing installation is available.

File

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

Class

InstallerExistingInstallationTest
Tests the installer with an existing Drupal installation.

Namespace

Drupal\FunctionalTests\Installer

Code

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');
}