aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/objects/sites.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/tests/objects/sites.php')
-rw-r--r--engine/tests/objects/sites.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/engine/tests/objects/sites.php b/engine/tests/objects/sites.php
index 4d079c30f..a01a661e3 100644
--- a/engine/tests/objects/sites.php
+++ b/engine/tests/objects/sites.php
@@ -18,7 +18,7 @@ class ElggCoreSiteTest extends ElggCoreUnitTest {
* Called before each test method.
*/
public function setUp() {
- $this->site = new ElggSiteTest;
+ $this->site = new ElggSiteTest();
}
/**
@@ -36,16 +36,13 @@ class ElggCoreSiteTest extends ElggCoreUnitTest {
parent::__destruct();
}
- /**
- * A basic test that will be called and fail.
- */
public function testElggSiteConstructor() {
$attributes = array();
$attributes['guid'] = NULL;
$attributes['type'] = 'site';
$attributes['subtype'] = NULL;
- $attributes['owner_guid'] = get_loggedin_userid();
- $attributes['container_guid'] = get_loggedin_userid();
+ $attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $attributes['container_guid'] = elgg_get_logged_in_user_guid();
$attributes['site_guid'] = NULL;
$attributes['access_id'] = ACCESS_PRIVATE;
$attributes['time_created'] = NULL;
@@ -66,8 +63,10 @@ class ElggCoreSiteTest extends ElggCoreUnitTest {
}
public function testElggSiteSaveAndDelete() {
- $this->assertTrue($this->site->save());
- $this->assertTrue($this->site->delete());
+ $guid = $this->site->save();
+ $this->assertIsA($guid, 'int');
+ $this->assertTrue($guid > 0);
+ $this->assertIdentical(true, $this->site->delete());
}
}