aboutsummaryrefslogtreecommitdiff
path: root/mod/diagnostics/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/diagnostics/start.php')
-rw-r--r--mod/diagnostics/start.php16
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.
*