aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 7e3dcb628..a73dde60c 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -2771,6 +2771,15 @@
}
/**
+ * Runs unit tests for the entities object.
+ */
+ function entities_test($hook, $type, $value, $params) {
+ global $CONFIG;
+ $params[] = $CONFIG->path . 'engine/tests/entities.php';
+ return $params;
+ }
+
+ /**
* Entities init function; establishes the page handler
*
*/
@@ -2778,6 +2787,8 @@
{
register_page_handler('view','entities_page_handler');
+ register_plugin_hook('unit_test', 'system', 'entities_test');
+
// Allow a permission override for recursive entity deletion
// TODO: Can this be done better?
register_plugin_hook('permissions_check','all','recursive_delete_permissions_check');