From edd26a0760174705dbd01a78936788ddd0fbb93d Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 2 Oct 2009 21:59:45 +0000 Subject: Added unit tests for entities. git-svn-id: http://code.elgg.org/elgg/trunk@3505 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 @@ -2770,6 +2770,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'); -- cgit v1.2.3