aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/sites.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-13 23:09:38 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-13 23:09:38 +0000
commit7c3434d467308d128f665b4b855d8d293ee7852b (patch)
tree8c752273b652a06bef7dad284f5fe0ea012b1490 /engine/lib/sites.php
parentbda4f8190d4add0a2e2cfcdf3e842b26665f4117 (diff)
downloadelgg-7c3434d467308d128f665b4b855d8d293ee7852b.tar.gz
elgg-7c3434d467308d128f665b4b855d8d293ee7852b.tar.bz2
Creating a generic ElggSite unit test.
git-svn-id: http://code.elgg.org/elgg/trunk@3534 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/sites.php')
-rw-r--r--engine/lib/sites.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 14cc2039d..e12a745c5 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -139,7 +139,7 @@
if ($CONFIG->site->getGUID() == $this->guid)
throw new SecurityException('SecurityException:deletedisablecurrentsite');
- return parent::delete;
+ return parent::delete();
}
/**
@@ -603,7 +603,12 @@
}
// Register event handlers
-
- register_elgg_event_handler('boot','system','sites_init',2);
-
-?> \ No newline at end of file
+ register_elgg_event_handler('boot','system','sites_init',2);
+
+ // Register with unit test
+ register_plugin_hook('unit_test', 'system', 'sites_test');
+ function sites_test($hook, $type, $value, $params) {
+ global $CONFIG;
+ $value[] = "{$CONFIG->path}engine/tests/objects/sites.php";
+ return $value;
+ }