You are here

public function ThunderInstallerTest::testInstalled in Thunder 8.3

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/Installer/ThunderInstallerTest.php \Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest::testInstalled()
  2. 8.2 tests/src/Functional/Installer/ThunderInstallerTest.php \Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest::testInstalled()
  3. 8.4 tests/src/Functional/Installer/ThunderInstallerTest.php \Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest::testInstalled()
  4. 6.2.x tests/src/Functional/Installer/ThunderInstallerTest.php \Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest::testInstalled()
  5. 6.0.x tests/src/Functional/Installer/ThunderInstallerTest.php \Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest::testInstalled()
  6. 6.1.x tests/src/Functional/Installer/ThunderInstallerTest.php \Drupal\Tests\thunder\Functional\Installer\ThunderInstallerTest::testInstalled()

Confirms that the installation succeeded.

File

tests/src/Functional/Installer/ThunderInstallerTest.php, line 188

Class

ThunderInstallerTest
Tests the interactive installer installing the standard profile.

Namespace

Drupal\Tests\thunder\Functional\Installer

Code

public function testInstalled() {
  $this
    ->assertSession()
    ->addressEquals('?tour=1');
  $this
    ->assertSession()
    ->statusCodeEquals(200);

  // Confirm that we are logged-in after installation.
  $this
    ->assertSession()
    ->pageTextContains($this->rootUser
    ->getAccountName());

  // Ensure demo content is installed.
  $this
    ->assertSession()
    ->pageTextContains('Burda Launches Open-Source CMS Thunder');
  $this
    ->assertSession()
    ->pageTextContains('Come to DrupalCon New Orleans');

  /** @var \Drupal\Core\Database\Query\SelectInterface $query */
  $query = \Drupal::database()
    ->select('watchdog', 'w')
    ->condition('severity', 4, '<');

  // Check that there are no warnings in the log after installation.
  $this
    ->assertEquals($query
    ->countQuery()
    ->execute()
    ->fetchField(), 0);
}