function InstallerBrokenDatabaseCredentialsTest::testRequirementsProblem

Same name in other branches
  1. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php \Drupal\FunctionalTests\Installer\InstallerBrokenDatabaseCredentialsTest::testRequirementsProblem()

Tests the expected requirements problem.

File

core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php, line 59

Class

InstallerBrokenDatabaseCredentialsTest
Tests the installer with incorrect connection info in settings.php.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testRequirementsProblem() : void {
    $this->assertSession()
        ->titleEquals('Requirements problem | Drupal');
    $this->assertSession()
        ->pageTextContains('Database settings');
    $this->assertSession()
        ->pageTextContains('Resolve all issues below to continue the installation. For help configuring your database server,');
    $this->assertSession()
        ->pageTextContains('[Tip: Drupal was attempting to connect to the database server via a socket, but the socket file could not be found. A Unix socket file is used if you do not specify a host name or if you specify the special host name localhost. To connect via TPC/IP use an IP address (127.0.0.1 for IPv4) instead of "localhost". This message normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name when trying to connect to the server.]');
}

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