aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php4
-rw-r--r--engine/lib/objects.php12
2 files changed, 12 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 779efb7af..b72eb6ff0 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -2787,8 +2787,8 @@
*/
function entities_test($hook, $type, $value, $params) {
global $CONFIG;
- $params[] = $CONFIG->path . 'engine/tests/objects/entities.php';
- return $params;
+ $value[] = $CONFIG->path . 'engine/tests/objects/entities.php';
+ return $value;
}
/**
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;
+}