You are here

public function BotchaTestRecipebookUI::testRecipebookUI in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.3 tests/botcha.simpletest.test \BotchaTestRecipebookUI::testRecipebookUI()

Tests for creating, modifying and deleting recipe books.

File

tests/botcha.simpletest.test, line 998
Simpletest-tests for BOTCHA module.

Class

BotchaTestRecipebookUI

Code

public function testRecipebookUI() {
  $forms = array(
    'addRecipebook',
    'editRecipebook',
    'deleteRecipebook',
  );

  // Parameters that need to be passed through methods.
  $parameters = array();
  foreach ($forms as $form) {
    $this
      ->getForm($form, $parameters);
    $edit = $this
      ->setFormValues($form, NULL, $parameters);
    $this
      ->postForm($form, $edit, NULL, $parameters);
    $this
      ->assertFormSubmission($form, $edit, NULL, NULL, $parameters);
  }
}