Fix testing errors due to accessing the session id by using our container

This commit is contained in:
Johannes Meyer 2014-07-16 10:18:00 +02:00
parent e6dee9fe89
commit e5fdf78c98
1 changed files with 1 additions and 0 deletions

View File

@ -317,6 +317,7 @@ namespace Icinga\Test {
$form = new $formClass;
// If the form has CSRF protection enabled, add the token to the request data, else all calls to
// isSubmittedAndValid will fail
$form->setSessionId('1234');
$form->initCsrfToken();
$token = $form->getValue($form->getTokenElementName());
if ($token !== null) {