public function BotchaTestCase::testFormSubmission in BOTCHA Spam Prevention 7.3
Same name and namespace in other branches
- 6.2 botcha.test \BotchaTestCase::testFormSubmission()
- 6.3 tests/botcha.simpletest.test \BotchaTestCase::testFormSubmission()
- 7.2 botcha.test \BotchaTestCase::testFormSubmission()
File
- tests/botcha.simpletest.test, line 1046
- Simpletest-tests for BOTCHA module.
Class
- BotchaTestCase
- Testing general BOTCHA functionality.
Code
public function testFormSubmission() {
$forms = array(
'comment',
);
foreach ($forms as $form) {
foreach ($this
->getExpectations() as $should_pass) {
foreach ($this
->getButtonsByForm($form) as $button) {
$this
->checkPreConditions($form, $should_pass, $button);
$this
->getForm($form);
$edit = $this
->setFormValues($form, $should_pass);
$this
->postForm($form, $edit, $button);
$this
->assertFormSubmission($form, $edit, $should_pass, $button);
}
}
}
}