aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-02 21:59:45 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-02 21:59:45 +0000
commitedd26a0760174705dbd01a78936788ddd0fbb93d (patch)
tree09dec78458daf05eaaecf0fd59ad6f68feab587e /engine/lib
parent13e62cb3c72c33042f0a30445b99500db7c765ee (diff)
downloadelgg-edd26a0760174705dbd01a78936788ddd0fbb93d.tar.gz
elgg-edd26a0760174705dbd01a78936788ddd0fbb93d.tar.bz2
Added unit tests for entities.
git-svn-id: http://code.elgg.org/elgg/trunk@3505 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-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');