InstallerExistingInstallationTest.php

Same filename and directory in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
  2. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
  3. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php

Namespace

Drupal\FunctionalTests\Installer

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php

View source
<?php

namespace Drupal\FunctionalTests\Installer;


/**
 * Tests the installer with an existing Drupal installation.
 *
 * @group Installer
 */
class InstallerExistingInstallationTest extends InstallerTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected $defaultTheme = 'stark';
    
    /**
     * Verifies that Drupal can't be reinstalled while an existing installation is
     * available.
     */
    public function testInstaller() {
        // Verify that Drupal can't be immediately reinstalled.
        $this->visitInstaller();
        $this->assertRaw('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->assertRaw('Drupal already installed');
    }

}

Classes

Title Deprecated Summary
InstallerExistingInstallationTest Tests the installer with an existing Drupal installation.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.