You are here

public function InstallerExistingInstallationTest::testInstaller in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Installer/InstallerExistingInstallationTest.php \Drupal\system\Tests\Installer\InstallerExistingInstallationTest::testInstaller()

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

File

core/modules/system/src/Tests/Installer/InstallerExistingInstallationTest.php, line 30
Contains \Drupal\system\Tests\Installer\InstallerExistingInstallationTest.

Class

InstallerExistingInstallationTest
Tests the installer with an existing Drupal installation.

Namespace

Drupal\system\Tests\Installer

Code

public function testInstaller() {

  // Verify that Drupal can't be immediately reinstalled.
  $this
    ->drupalGet($GLOBALS['base_url'] . '/core/install.php');
  $this
    ->assertRaw('Drupal already installed');

  // Delete settings.php and attempt to reinstall again.
  unlink($this->siteDirectory . '/settings.php');
  $this
    ->drupalGet($GLOBALS['base_url'] . '/core/install.php');
  $this
    ->setUpLanguage();
  $this
    ->setUpProfile();
  $this
    ->setUpSettings();
  $this
    ->assertRaw('Drupal already installed');
}