aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/objects.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-09 17:11:25 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-09 17:11:25 +0000
commitb62012bf3da994298ad52a4ccec06e814bcc5a79 (patch)
treee8117952cca46ef10c6543d388e92bd6e232fb34 /engine/lib/objects.php
parent4bad66f81ae1c6798af56121ffba1045a36ee034 (diff)
downloadelgg-b62012bf3da994298ad52a4ccec06e814bcc5a79.tar.gz
elgg-b62012bf3da994298ad52a4ccec06e814bcc5a79.tar.bz2
Creating an ElggObject unit test.
Fixing issues with the unit test plugin hooks, as well as infinite looping bugs introduced by the unit test skeleton. git-svn-id: http://code.elgg.org/elgg/trunk@3519 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/objects.php')
-rw-r--r--engine/lib/objects.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php
index 7e7e956a4..8d09b178b 100644
--- a/engine/lib/objects.php
+++ b/engine/lib/objects.php
@@ -364,5 +364,13 @@
return get_entities_from_relationship("member_of_site", $object_guid, false, "site", "", 0, "time_created desc", $limit, $offset);
}
-
-?> \ No newline at end of file
+
+/**
+ * Runs unit tests for ElggObject
+ */
+register_plugin_hook('unit_test', 'system', 'objects_test');
+function objects_test($hook, $type, $value, $params) {
+ global $CONFIG;
+ $value[] = "{$CONFIG->path}engine/tests/objects/objects.php";
+ return $value;
+}