InstallerExistingInstallationTest.php 817 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Tests the installer with an existing Drupal installation.
  5. *
  6. * @group Installer
  7. */
  8. class InstallerExistingInstallationTest extends InstallerTestBase {
  9. /**
  10. * Verifies that Drupal can't be reinstalled while an existing installation is
  11. * available.
  12. */
  13. public function testInstaller() {
  14. // Verify that Drupal can't be immediately reinstalled.
  15. $this->visitInstaller();
  16. $this->assertRaw('Drupal already installed');
  17. // Delete settings.php and attempt to reinstall again.
  18. unlink($this->siteDirectory . '/settings.php');
  19. $this->visitInstaller();
  20. $this->setUpLanguage();
  21. $this->setUpProfile();
  22. $this->setUpRequirementsProblem();
  23. $this->setUpSettings();
  24. $this->assertRaw('Drupal already installed');
  25. }
  26. }