You are here

function form_test_mock_form in SimpleTest 7

A simple form with a textfield and submit button.

1 string reference to 'form_test_mock_form'
form_test_batch_callback in tests/form_test.module
Submits form_test_mock_form using drupal_form_submit using the given $value.

File

tests/form_test.module, line 243
Helper module for the form API tests.

Code

function form_test_mock_form($form, $form_state) {
  $form['test_value'] = array(
    '#type' => 'textfield',
    '#default_value' => 'initial_state',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}