Add integration test for captcha session

[MAILPOET-2248]
This commit is contained in:
Rostislav Wolny
2019-08-05 16:19:58 +02:00
committed by Jack Kitterhing
parent 13724898d1
commit 579ce5fc64
2 changed files with 81 additions and 2 deletions

View File

@@ -48,9 +48,10 @@ class CaptchaSession {
}
private function getKey($type) {
if ($this->session->getId() === null) {
$session_id = $this->session->getId();
if ($session_id === null) {
throw new \Exception("MailPoet session not initialized.");
}
return implode('_', ['MAILPOET', $this->session->getId(), $type]);
return implode('_', ['MAILPOET', $session_id, $type]);
}
}