You are here

function FormsFormStorageTestCase::testValidation in SimpleTest 7

Tests validation when form storage is used.

File

tests/form.test, line 430
Unit tests for the Drupal Form API.

Class

FormsFormStorageTestCase
Test the form storage on a multistep form.

Code

function testValidation() {
  $user = $this
    ->drupalCreateUser(array(
    'access content',
  ));
  $this
    ->drupalLogin($user);
  $this
    ->drupalPost('form_test/form-storage', array(
    'title' => '',
    'value' => 'value_is_set',
  ), 'Continue');
  $this
    ->assertPattern('/value_is_set/', t("The input values have been kept."));
}