public function SessionTest::sessionReset in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Session/SessionTest.php \Drupal\Tests\system\Functional\Session\SessionTest::sessionReset()
- 9 core/modules/system/tests/src/Functional/Session/SessionTest.php \Drupal\Tests\system\Functional\Session\SessionTest::sessionReset()
Reset the cookie file so that it refers to the specified user.
2 calls to SessionTest::sessionReset()
- SessionTest::testDataPersistence in core/
modules/ system/ tests/ src/ Functional/ Session/ SessionTest.php - Tests data persistence via the session_test module callbacks.
- SessionTest::testSessionSaveRegenerate in core/
modules/ system/ tests/ src/ Functional/ Session/ SessionTest.php - Tests for \Drupal\Core\Session\WriteSafeSessionHandler::setSessionWritable() ::isSessionWritable and \Drupal\Core\Session\SessionManager::regenerate().
File
- core/
modules/ system/ tests/ src/ Functional/ Session/ SessionTest.php, line 361
Class
- SessionTest
- Drupal session handling tests.
Namespace
Drupal\Tests\system\Functional\SessionCode
public function sessionReset() {
// Close the internal browser.
$this->mink
->resetSessions();
$this->loggedInUser = FALSE;
// Change cookie file for user.
$this
->drupalGet('session-test/get');
$this
->assertSession()
->statusCodeEquals(200);
}