3ba045a0ad6083adfd632666b89106018d0df79e
[yaffs-website] / web / core / modules / system / src / Tests / Installer / InstallerExistingInstallationTest.php
1 <?php
2
3 namespace Drupal\system\Tests\Installer;
4
5 use Drupal\simpletest\InstallerTestBase;
6
7 /**
8  * Tests the installer with an existing Drupal installation.
9  *
10  * @group Installer
11  */
12 class InstallerExistingInstallationTest extends InstallerTestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   protected function setUp() {
18     parent::setUp();
19   }
20
21   /**
22    * Verifies that Drupal can't be reinstalled while an existing installation is
23    * available.
24    */
25   public function testInstaller() {
26     // Verify that Drupal can't be immediately reinstalled.
27     $this->visitInstaller();
28     $this->assertRaw('Drupal already installed');
29
30     // Delete settings.php and attempt to reinstall again.
31     unlink($this->siteDirectory . '/settings.php');
32     $this->visitInstaller();
33     $this->setUpLanguage();
34     $this->setUpProfile();
35     $this->setUpSettings();
36     $this->assertRaw('Drupal already installed');
37   }
38
39 }