You are here

function authcache_test_form_value in Authenticated User Page Caching (Authcache) 7.2

Form API callback for test from with a value element.

2 string references to 'authcache_test_form_value'
AuthcachePolicyTestCase::testDefaultCancelationRules in ./authcache.test
Test builtin standard cache cancelation rules.
authcache_test_menu in tests/authcache_test.module
Implements hook_menu().

File

tests/authcache_test.module, line 179
Mock module to aid in testing authcache.module.

Code

function authcache_test_form_value($form, &$form_state, $cached) {
  $form['authcache_test_form_value'] = array(
    '#type' => 'value',
    '#value' => '42',
  );
  $form_state['cache'] = filter_var($cached, FILTER_VALIDATE_BOOLEAN);

  // Disable CSRF protection on this form in order to avoid interference with
  // other tests.
  $form['#token'] = FALSE;
  return system_settings_form($form, $form_state);
}