From 8ee1e41a3d6a1c11e6e93c086210864012364013 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 4 Feb 2010 04:36:34 +0000 Subject: Refs #1200: Changed logic in elgg_get_entity_type_subtype_where_sql() to return FALSE if there are no valid subtypes passed. Ignores all invalid subtypes. Added (partial) tests for elgg_get_entities() types and subtypes. git-svn-id: http://code.elgg.org/elgg/trunk@3901 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index ce383ed8c..357141baa 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -2686,6 +2686,15 @@ function elgg_boot() { elgg_view_register_simplecache('js/initialise_elgg'); } +/** + * Runs unit tests for the API. + */ +function elgg_api_test($hook, $type, $value, $params) { + global $CONFIG; + $value[] = $CONFIG->path . 'engine/tests/api/entity_getter_functions.php'; + return $value; +} + /** * Some useful constant definitions */ @@ -2697,3 +2706,4 @@ define('ACCESS_FRIENDS',-2); register_elgg_event_handler('init','system','elgg_init'); register_elgg_event_handler('boot','system','elgg_boot',1000); +register_plugin_hook('unit_test', 'system', 'elgg_api_test'); \ No newline at end of file -- cgit v1.2.3