From e5fdf78c98d8ab1053a4e5ffeea3d7385e6c8a8f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 16 Jul 2014 10:18:00 +0200 Subject: [PATCH] Fix testing errors due to accessing the session id by using our container --- library/Icinga/Test/BaseTestCase.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Icinga/Test/BaseTestCase.php b/library/Icinga/Test/BaseTestCase.php index 50f7bc1b9..b72bdee62 100644 --- a/library/Icinga/Test/BaseTestCase.php +++ b/library/Icinga/Test/BaseTestCase.php @@ -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) {