diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-05-13 16:13:40 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-05-13 16:13:40 +0000 |
commit | 99b38e5d1bde9654418416f1bb5675c4b3bec6ed (patch) | |
tree | bad1aa9e98103711e9700ac6e3d1c317e9688c73 /mod/diagnostics/start.php | |
parent | 3773f8d81c53dd0508325d6380ee49569951a61f (diff) | |
download | elgg-99b38e5d1bde9654418416f1bb5675c4b3bec6ed.tar.gz elgg-99b38e5d1bde9654418416f1bb5675c4b3bec6ed.tar.bz2 |
Closes #1009: Diagnostics unit test with example
git-svn-id: https://code.elgg.org/elgg/trunk@3287 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/diagnostics/start.php')
-rw-r--r-- | mod/diagnostics/start.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index a7afe346e..de8e09468 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -22,6 +22,12 @@ // Register some actions register_action("diagnostics/download",false, $CONFIG->pluginspath . "diagnostics/actions/download.php"); + + // If debug on then enable an example test + if ((isset($CONFIG->debug)) && ($CONFIG->debug)) + { + register_elgg_test(elgg_echo('diagnostics:unittest:example'), 'diagnostics_test_test'); + } } /** @@ -37,6 +43,16 @@ } } + function diagnostics_test_test() + { + ob_start(); + + for ($n = 0; $n<5; $n++) + echo "$n "; + + return ElggTestResult::CreateSuccessResult(ob_get_clean()); + } + /** * Diagnostics page. * |