function SessionTest::testSessionExpiration

Same name in other branches
  1. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::testSessionExpiration()
  2. 10 core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::testSessionExpiration()
  3. 11.x 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');
    }
}

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