Loading tests/botcha.simpletest.test +15 −15 Original line number Diff line number Diff line Loading @@ -1118,8 +1118,8 @@ class BotchaHoneypotTestCase extends BotchaUsingJsTestCase { return array(FALSE); } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); // Since we can't test javascript (is there a way to do it?) and Simpletest // can't evaluate javascript we should do nothing to break the submission. return $edit; Loading Loading @@ -1150,8 +1150,8 @@ class BotchaHoneypot2TestCase extends BotchaUsingJsTestCase { return array(FALSE); } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); // Since we can't test javascript (is there a way to do it?) and Simpletest // can't evaluate javascript we should do nothing to break the submission. return $edit; Loading Loading @@ -1181,8 +1181,8 @@ class BotchaObscureUrlTestCase extends BotchaUsingJsTestCase { return array(FALSE); } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); // Since we can't test javascript (is there a way to do it?) and Simpletest // can't evaluate javascript we should do nothing to break the submission. return $edit; Loading Loading @@ -1218,8 +1218,8 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { return TRUE; } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); switch ($should_pass) { case FALSE: // Get form_build_id of the form (to simulate resubmit). Loading @@ -1230,7 +1230,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { parent::assertFormSubmission($form, $edit, TRUE); // Get new form. $this->getForm($form); //$edit = parent::setFormValues($form, $should_pass); //$edit = parent::setFormValues($form, $should_pass, $parameters); // Set form_build_id of the current form to stored value (to simulate resubmit). $edit['form_build_id'] = $form_build_id; break; Loading @@ -1242,7 +1242,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { return $edit; } public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) { public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL, &$parameters = array()) { switch ($form) { case 'user_login': case 'comment': Loading @@ -1258,7 +1258,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { } // We are placing it to the end since we have a redirection there which // makes impossible to assert submission by these conditions. parent::assertFormSubmission($form, $edit, $should_pass, $button); parent::assertFormSubmission($form, $edit, $should_pass, $button, $parameters); } /* @todo ?Where to place and how to test MultipleBotchaProtectedFormsOnOnePage test case? public function testMultipleBotchaProtectedFormsOnOnePage() { Loading Loading @@ -1310,8 +1310,8 @@ class BotchaTimegateTestCase extends BotchaTestCase { * @param type $should_pass * @return type */ protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); switch ($should_pass) { case FALSE: unset($edit['timegate']); Loading @@ -1335,7 +1335,7 @@ class BotchaTimegateTestCase extends BotchaTestCase { } } public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) { public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL, &$parameters = array()) { switch ($form) { case 'user_login': case 'comment': Loading @@ -1351,7 +1351,7 @@ class BotchaTimegateTestCase extends BotchaTestCase { } // We are placing it to the end since we have a redirection there which // makes impossible to assert submission by these conditions. parent::assertFormSubmission($form, $edit, $should_pass, $button); parent::assertFormSubmission($form, $edit, $should_pass, $button, $parameters); } } // Some tricks to debug: Loading Loading
tests/botcha.simpletest.test +15 −15 Original line number Diff line number Diff line Loading @@ -1118,8 +1118,8 @@ class BotchaHoneypotTestCase extends BotchaUsingJsTestCase { return array(FALSE); } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); // Since we can't test javascript (is there a way to do it?) and Simpletest // can't evaluate javascript we should do nothing to break the submission. return $edit; Loading Loading @@ -1150,8 +1150,8 @@ class BotchaHoneypot2TestCase extends BotchaUsingJsTestCase { return array(FALSE); } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); // Since we can't test javascript (is there a way to do it?) and Simpletest // can't evaluate javascript we should do nothing to break the submission. return $edit; Loading Loading @@ -1181,8 +1181,8 @@ class BotchaObscureUrlTestCase extends BotchaUsingJsTestCase { return array(FALSE); } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); // Since we can't test javascript (is there a way to do it?) and Simpletest // can't evaluate javascript we should do nothing to break the submission. return $edit; Loading Loading @@ -1218,8 +1218,8 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { return TRUE; } protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); switch ($should_pass) { case FALSE: // Get form_build_id of the form (to simulate resubmit). Loading @@ -1230,7 +1230,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { parent::assertFormSubmission($form, $edit, TRUE); // Get new form. $this->getForm($form); //$edit = parent::setFormValues($form, $should_pass); //$edit = parent::setFormValues($form, $should_pass, $parameters); // Set form_build_id of the current form to stored value (to simulate resubmit). $edit['form_build_id'] = $form_build_id; break; Loading @@ -1242,7 +1242,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { return $edit; } public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) { public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL, &$parameters = array()) { switch ($form) { case 'user_login': case 'comment': Loading @@ -1258,7 +1258,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase { } // We are placing it to the end since we have a redirection there which // makes impossible to assert submission by these conditions. parent::assertFormSubmission($form, $edit, $should_pass, $button); parent::assertFormSubmission($form, $edit, $should_pass, $button, $parameters); } /* @todo ?Where to place and how to test MultipleBotchaProtectedFormsOnOnePage test case? public function testMultipleBotchaProtectedFormsOnOnePage() { Loading Loading @@ -1310,8 +1310,8 @@ class BotchaTimegateTestCase extends BotchaTestCase { * @param type $should_pass * @return type */ protected function setFormValues($form, $should_pass) { $edit = parent::setFormValues($form, $should_pass); protected function setFormValues($form, $should_pass, &$parameters = array()) { $edit = parent::setFormValues($form, $should_pass, $parameters); switch ($should_pass) { case FALSE: unset($edit['timegate']); Loading @@ -1335,7 +1335,7 @@ class BotchaTimegateTestCase extends BotchaTestCase { } } public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) { public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL, &$parameters = array()) { switch ($form) { case 'user_login': case 'comment': Loading @@ -1351,7 +1351,7 @@ class BotchaTimegateTestCase extends BotchaTestCase { } // We are placing it to the end since we have a redirection there which // makes impossible to assert submission by these conditions. parent::assertFormSubmission($form, $edit, $should_pass, $button); parent::assertFormSubmission($form, $edit, $should_pass, $button, $parameters); } } // Some tricks to debug: Loading