InstallerExistingInstallationTest.php 886 B

123456789101112131415161718192021222324252627282930313233343536
  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. * {@inheritdoc}
  11. */
  12. protected $defaultTheme = 'stark';
  13. /**
  14. * Verifies that Drupal can't be reinstalled while an existing installation is
  15. * available.
  16. */
  17. public function testInstaller() {
  18. // Verify that Drupal can't be immediately reinstalled.
  19. $this->visitInstaller();
  20. $this->assertRaw('Drupal already installed');
  21. // Delete settings.php and attempt to reinstall again.
  22. unlink($this->siteDirectory . '/settings.php');
  23. $this->visitInstaller();
  24. $this->setUpLanguage();
  25. $this->setUpProfile();
  26. $this->setUpRequirementsProblem();
  27. $this->setUpSettings();
  28. $this->assertRaw('Drupal already installed');
  29. }
  30. }