From b3bad6fc928cae56bdc3a97fe8089b27f6f79f0b Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Sun, 3 Jul 2011 16:52:33 -0400 Subject: Merged d423aee393458d6827db from 1.7 to master. Fixes #3552. Addess ACL unit tests. These currently fail because of #3522. git-svn-id: http://code.elgg.org/elgg/branches/1.7@9202 36083f99-b078-4883-b0ff-0f9b5a30f544 Conflicts: engine/lib/access.php --- engine/lib/access.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/access.php b/engine/lib/access.php index cde3d256f..303152816 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -956,9 +956,20 @@ function elgg_override_permissions_hook() { return NULL; } +/** + * Runs unit tests for the entities object. + */ +function access_test($hook, $type, $value, $params) { + global $CONFIG; + $value[] = $CONFIG->path . 'engine/tests/api/access_collections.php'; + return $value; +} + // This function will let us know when 'init' has finished elgg_register_event_handler('init', 'system', 'access_init', 9999); // For overrided permissions elgg_register_plugin_hook_handler('permissions_check', 'all', 'elgg_override_permissions_hook'); elgg_register_plugin_hook_handler('container_permissions_check', 'all', 'elgg_override_permissions_hook'); + +elgg_register_plugin_hook('unit_test', 'system', 'access_test'); -- cgit v1.2.3