function authcache_test_menu in Authenticated User Page Caching (Authcache) 7.2
Implements hook_menu().
File
- tests/
authcache_test.module, line 11 - Mock module to aid in testing authcache.module.
Code
function authcache_test_menu() {
$item['authcache-test-page-one'] = array(
'title' => 'Test page one',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
);
$item['authcache-test-page-two'] = array(
'title' => 'Test page one',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
);
$item['authcache-test-403'] = array(
'title' => 'Test page one',
'page callback' => 'authcache_test_empty_page',
'access callback' => FALSE,
);
$item['cart/authcache-test-default-nocache'] = array(
'title' => 'Test page within a default nocache rule',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
);
$item['authcache-test-form'] = array(
'title' => 'Test form',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'authcache_test_form',
),
'access callback' => TRUE,
);
$item['authcache-test-form-value-no-cache'] = array(
'title' => 'Test form with value not cached',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'authcache_test_form_value',
'no',
),
'access callback' => TRUE,
);
$item['authcache-test-form-value-cache'] = array(
'title' => 'Test form with value cached',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'authcache_test_form_value',
'yes',
),
'access callback' => TRUE,
);
$item['authcache-test-action'] = array(
'title' => 'Test site with action link',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
);
$item['authcache-test-action/action'] = array(
'title' => 'Action link',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
'type' => MENU_LOCAL_ACTION,
);
$item['authcache-test-tab'] = array(
'title' => 'Test site with action link',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
'type' => MENU_NORMAL_ITEM,
);
$item['authcache-test-tab/first'] = array(
'title' => 'First task',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$item['authcache-test-tab/second'] = array(
'title' => 'Second task',
'page callback' => 'authcache_test_empty_page',
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
);
$item['authcache-test-redirect'] = array(
'title' => 'Redirect',
'page callback' => 'authcache_test_redirect',
'access callback' => TRUE,
);
$item['authcache-test-content-type'] = array(
'title' => 'Blank with content-type',
'page callback' => 'authcache_test_content_type',
'access callback' => TRUE,
);
$item['authcache-test-headers-sent'] = array(
'title' => 'Headers sent',
'page callback' => 'authcache_test_headers_sent',
'access callback' => TRUE,
);
$item['authcache-test-file-transfer'] = array(
'title' => 'Private file transfer',
'page callback' => 'authcache_test_file_transfer',
'access callback' => TRUE,
);
$item['authcache-test-php-error'] = array(
'title' => 'Page with PHP error',
'page callback' => 'authcache_test_php_error',
'access callback' => TRUE,
);
$item['authcache-test-redirect-location'] = array(
'title' => 'Redirect',
'page callback' => 'authcache_test_redirect_location',
'access callback' => TRUE,
);
$item['authcache-test-php-error'] = array(
'title' => 'PHP Error',
'page callback' => 'authcache_test_php_error',
'access callback' => TRUE,
);
$item['authcache-test-change-vary'] = array(
'title' => 'Change Vary',
'page callback' => 'authcache_test_change_vary',
'access callback' => TRUE,
);
$item['authcache-test-get-key'] = array(
'title' => 'Return authcache key',
'page callback' => 'authcache_test_get_key',
'access callback' => TRUE,
);
$item['authcache-test-add-cookie'] = array(
'title' => 'Add cookie to response',
'page callback' => 'authcache_test_add_cookie',
'access callback' => TRUE,
);
$item['authcache-test-session-counter'] = array(
'title' => 'Increment counter stored in a session',
'page callback' => 'authcache_test_session_counter',
'access callback' => TRUE,
);
$item['authcache-test-session-clear'] = array(
'title' => 'Clear session',
'page callback' => 'authcache_test_session_clear',
'access callback' => TRUE,
);
return $item;
}