summaryrefslogtreecommitdiffstatshomepage
path: root/modules/simpletest/tests/ajax_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/ajax_test.module')
-rw-r--r--modules/simpletest/tests/ajax_test.module71
1 files changed, 0 insertions, 71 deletions
diff --git a/modules/simpletest/tests/ajax_test.module b/modules/simpletest/tests/ajax_test.module
deleted file mode 100644
index 4148a0839fb..00000000000
--- a/modules/simpletest/tests/ajax_test.module
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/**
- * @file
- * Helper module for Ajax framework tests.
- */
-
-/**
- * Implements hook_menu().
- */
-function ajax_test_menu() {
- $items['ajax-test/render'] = array(
- 'title' => 'ajax_render',
- 'page callback' => 'ajax_test_render',
- 'delivery callback' => 'ajax_deliver',
- 'access callback' => TRUE,
- 'type' => MENU_CALLBACK,
- );
- $items['ajax-test/render-error'] = array(
- 'title' => 'ajax_render_error',
- 'page callback' => 'ajax_test_error',
- 'delivery callback' => 'ajax_deliver',
- 'access callback' => TRUE,
- 'type' => MENU_CALLBACK,
- );
- $items['ajax-test/link'] = array(
- 'title' => 'AJAX Link',
- 'page callback' => 'ajax_test_link',
- 'access callback' => TRUE,
- );
- return $items;
-}
-
-/**
- * Menu callback; Return an element suitable for use by ajax_deliver().
- *
- * Additionally ensures that ajax_render() incorporates JavaScript settings
- * generated during the page request by invoking drupal_add_js() with a dummy
- * setting.
- */
-function ajax_test_render() {
- drupal_add_js(array('ajax' => 'test'), 'setting');
- return array('#type' => 'ajax', '#commands' => array());
-}
-
-/**
- * Menu callback; Returns Ajax element with #error property set.
- */
-function ajax_test_error() {
- $message = '';
- if (!empty($_GET['message'])) {
- $message = $_GET['message'];
- }
- return array('#type' => 'ajax', '#error' => $message);
-}
-
-/**
- * Menu callback; Renders a #type link with #ajax.
- */
-function ajax_test_link() {
- $build['link'] = array(
- '#type' => 'link',
- '#title' => 'Show help',
- '#href' => 'filter/tips',
- '#ajax' => array(
- 'wrapper' => 'block-system-main',
- ),
- );
- return $build;
-}
-