diff options
Diffstat (limited to 'modules/simpletest/tests/system_test.module')
-rw-r--r-- | modules/simpletest/tests/system_test.module | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/modules/simpletest/tests/system_test.module b/modules/simpletest/tests/system_test.module index 68b6e5cb7..6da183b24 100644 --- a/modules/simpletest/tests/system_test.module +++ b/modules/simpletest/tests/system_test.module @@ -53,35 +53,6 @@ function system_test_menu() { 'type' => MENU_CALLBACK, ); - $items['system-test/generate-warnings'] = array( - 'title' => 'Generate warnings', - 'page callback' => 'system_test_generate_warnings', - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, - ); - - $items['system-test/generate-warnings-with-report'] = array( - 'title' => 'Generate warnings with Simpletest reporting', - 'page callback' => 'system_test_generate_warnings', - 'page arguments' => array(TRUE), - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, - ); - - $items['system-test/trigger-exception'] = array( - 'title' => 'Trigger an exception', - 'page callback' => 'system_test_trigger_exception', - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, - ); - - $items['system-test/trigger-pdo-exception'] = array( - 'title' => 'Trigger a PDO exception', - 'page callback' => 'system_test_trigger_pdo_exception', - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, - ); - return $items; } @@ -184,33 +155,3 @@ function system_test_exit() { watchdog('system_test', 'hook_exit'); } -/** - * Menu callback; generate warnings to test the error handler. - */ -function system_test_generate_warnings($collect_errors = FALSE) { - // Tell Drupal error reporter to send errors to Simpletest or not. - define('SIMPLETEST_COLLECT_ERRORS', $collect_errors); - // This will generate a notice. - $monkey_love = $bananas; - // This will generate a warning. - $awesomely_big = 1/0; - // This will generate a user error. - trigger_error("Drupal is awesome", E_USER_NOTICE); - return ""; -} - -/** - * Menu callback; trigger an exception to test the exception handler. - */ -function system_test_trigger_exception() { - define('SIMPLETEST_COLLECT_ERRORS', FALSE); - throw new Exception("Drupal is awesome"); -} - -/** - * Menu callback; trigger an exception to test the exception handler. - */ -function system_test_trigger_pdo_exception() { - define('SIMPLETEST_COLLECT_ERRORS', FALSE); - db_query("SELECT * FROM bananas_are_awesome"); -} |