aboutsummaryrefslogtreecommitdiff
path: root/mod/htmlawed/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/htmlawed/start.php')
-rw-r--r--mod/htmlawed/start.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/htmlawed/start.php b/mod/htmlawed/start.php
index 5af18f4dd..b52a390bb 100644
--- a/mod/htmlawed/start.php
+++ b/mod/htmlawed/start.php
@@ -18,6 +18,8 @@ function htmlawed_init() {
$lib = elgg_get_plugins_path() . "htmlawed/vendors/htmLawed/htmLawed.php";
elgg_register_library('htmlawed', $lib);
+
+ elgg_register_plugin_hook_handler('unit_test', 'system', 'htmlawed_test');
}
/**
@@ -143,3 +145,15 @@ function htmlawed_tag_post_processor($element, $attributes = array()) {
$r = "<$element$string>";
return $r;
}
+
+/**
+ * Runs unit tests for htmlawed
+ *
+ * @return array
+ * */
+function htmlawed_test($hook, $type, $value, $params) {
+ global $CONFIG;
+
+ $value[] = dirname(__FILE__) . '/tests/tags.php';
+ return $value;
+}