diff --git a/test/php/library/Icinga/Web/FormTest.php b/test/php/library/Icinga/Web/FormTest.php index 662b1421f2..2494b55c53 100644 --- a/test/php/library/Icinga/Web/FormTest.php +++ b/test/php/library/Icinga/Web/FormTest.php @@ -8,6 +8,14 @@ use Icinga\Web\Request; use Icinga\Test\BaseTestCase; +class PostRequest extends Request +{ + public function getMethod() + { + return 'POST'; + } +} + class SuccessfulForm extends Form { public function onSuccess() @@ -58,6 +66,7 @@ public function testWhetherIsSubmittedReturnsTrueWithASubmitLabelBeingSet() $form->setTokenDisabled(); $form->setSubmitLabel('test'); $form->populate(array('btn_submit' => true)); + $form->setRequest(new PostRequest()); $this->assertTrue( $form->isSubmitted(),