mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Fix testing errors due to accessing the session id by using our container
This commit is contained in:
parent
e6dee9fe89
commit
e5fdf78c98
@ -317,6 +317,7 @@ namespace Icinga\Test {
|
|||||||
$form = new $formClass;
|
$form = new $formClass;
|
||||||
// If the form has CSRF protection enabled, add the token to the request data, else all calls to
|
// If the form has CSRF protection enabled, add the token to the request data, else all calls to
|
||||||
// isSubmittedAndValid will fail
|
// isSubmittedAndValid will fail
|
||||||
|
$form->setSessionId('1234');
|
||||||
$form->initCsrfToken();
|
$form->initCsrfToken();
|
||||||
$token = $form->getValue($form->getTokenElementName());
|
$token = $form->getValue($form->getTokenElementName());
|
||||||
if ($token !== null) {
|
if ($token !== null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user