public function CaptchaCronTest::setUp in CAPTCHA 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ CaptchaCronTest.php, line 37
Class
- CaptchaCronTest
- Tests CAPTCHA cron.
Namespace
Drupal\Tests\captcha\FunctionalCode
public function setUp() {
parent::setUp();
ini_set('session.gc_maxlifetime', 60 * 60 * 24);
// Get request time.
$request_time = \Drupal::time()
->getRequestTime();
// Add removed session.
$time = $request_time - 1 - 60 * 60 * 24;
$this->captchaSessions['remove_sid'] = $this
->addCaptchaSession('captcha_cron_test_remove', $time);
// Add remain session.
$this->captchaSessions['remain_sid'] = $this
->addCaptchaSession('captcha_cron_test_remain', $request_time);
}