diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-05-13 15:59:22 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-05-13 15:59:22 +0000 |
commit | 3773f8d81c53dd0508325d6380ee49569951a61f (patch) | |
tree | c3ac0a4d080375bb325f140d0de66c33db703f80 /mod/diagnostics/start.php | |
parent | cf07718b4e44cb2711380a0ceb37de1031a5d4a8 (diff) | |
download | elgg-3773f8d81c53dd0508325d6380ee49569951a61f.tar.gz elgg-3773f8d81c53dd0508325d6380ee49569951a61f.tar.bz2 |
Refs #1009: Enhancements to diagnostics tool to use the test framework.
git-svn-id: https://code.elgg.org/elgg/trunk@3286 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/diagnostics/start.php')
-rw-r--r-- | mod/diagnostics/start.php | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 5bf2dc468..a7afe346e 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -33,6 +33,7 @@ if (get_context() == 'admin' && isadminloggedin()) { global $CONFIG; add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/'); + add_submenu_item(elgg_echo('diagnostics:unittester'), $CONFIG->wwwroot . 'pg/diagnostics/tests/'); } } @@ -45,8 +46,31 @@ { global $CONFIG; - // only interested in one page for now - include($CONFIG->pluginspath . "diagnostics/index.php"); + if (isset($page[0])) + { + switch ($page[0]) + { + case 'tests' : + if ((isset($page[1])) && ($page[1])) { + switch ($page[1]) + { + case 'all': break; + default: set_input('test_func', $page[1]); + } + + include($CONFIG->pluginspath . "diagnostics/testreport.php"); + } + else + include($CONFIG->pluginspath . "diagnostics/unittester.php"); + break; + default: include($CONFIG->pluginspath . "diagnostics/index.php"); + } + } + else + { + // only interested in one page for now + include($CONFIG->pluginspath . "diagnostics/index.php"); + } } /** |