You are here

public function SessionTest::testSessionExpiration in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::testSessionExpiration()

Tests that the session doesn't expire.

Makes sure that drupal_valid_test_ua() works for multiple requests performed by the Mink browser. The SIMPLETEST_USER_AGENT cookie must always be valid.

File

core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php, line 51

Class

SessionTest
Tests that sessions don't expire.

Namespace

Drupal\FunctionalJavascriptTests\Core\Session

Code

public function testSessionExpiration() {

  // Visit the front page and click the link back to the front page a large
  // number of times.
  $this
    ->drupalGet('<front>');
  $page = $this
    ->getSession()
    ->getPage();
  for ($i = 0; $i < 25; $i++) {
    $page
      ->clickLink('Link to front page');
  }
}