This is an old revision of the document!
Table of Contents
tests/integration/RememberMeIntegrationTest.php
Source: tests/integration/RememberMeIntegrationTest.php · 278 lines, ~1431 statements · namespace: (global) · `declare(strict_types=1)`: no
Remember Me Integration Test
Regression tests for the persistent login (“Remember Me”) token lifecycle used by admin/authenticator.php Path 2 and Scriptlog\Core\Authentication.
The tests exercise the exact DB operations performed when the remember flag is on, mirroring the production flow:
\ - Tokenizer::createToken() → random validator/selector \ - Tokenizer::setRandomPasswordProtected() → bcrypt validator hash \ - Tokenizer::setRandomSelectorProtected() → encrypted selector hash \ - UserTokenDao::createUserToken() → persist the token \ - UserTokenDao::getTokenByLogin() → fetch unexpired/expired \ - UserTokenDao::updateTokenExpired() → invalidate old token \ - UserTokenDao::updateUserToken() → renew/rotate (same row) \ - UserTokenDao::deleteUserToken() → logout cleanup (expired)
It also verifies the Tokenizer validator/selector round-trips that authenticator.php relies on to trust the scriptlog_validator / scriptlog_selector cookie pair.
Imports
^ Alias ^ Fully-qualified name ^ | ''TestCase'' | ''PHPUnit\Framework\TestCase'' | | ''Registry'' | ''Scriptlog\Core\Registry'' | | ''Tokenizer'' | ''Scriptlog\Core\Tokenizer'' | | ''UserTokenDao'' | ''Scriptlog\Dao\UserTokenDao'' |
Includes
^ Mode ^ Target ^ Line ^ | ''require'' | ''require_once __DIR__ . '/../../lib/core/Registry.php';'' | 33 | | ''require'' | ''require_once __DIR__ . '/../../lib/core/Tokenizer.php';'' | 34 |
