You are here

function BotchaAdminTestCase::testRecipebookUI in BOTCHA Spam Prevention 7.2

Tests for creating, modifying and deleting recipe books.

File

./botcha.test, line 850
Tests for BOTCHA module.

Class

BotchaAdminTestCase

Code

function testRecipebookUI() {

  // Log in as admin.
  $this
    ->drupalLogin($this->admin_user);

  // Clean the environment.
  Botcha::clean();
  $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);
  }
  $this
    ->drupalLogout();
}