aboutsummaryrefslogtreecommitdiff
path: root/engine/tests
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 19:27:58 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 19:27:58 +0000
commit1368785a6b6f9c946dcc5eca078540bacce71f60 (patch)
tree1aa0857127ef2f21cc2e64a608d94359da172bab /engine/tests
parent9074f002ad0603014c90b12aaaf2c51d740638e9 (diff)
downloadelgg-1368785a6b6f9c946dcc5eca078540bacce71f60.tar.gz
elgg-1368785a6b6f9c946dcc5eca078540bacce71f60.tar.bz2
Refs #2543: Core uses the new functions from previous commit.
git-svn-id: http://code.elgg.org/elgg/trunk@8078 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests')
-rw-r--r--engine/tests/objects/entities.php4
-rw-r--r--engine/tests/objects/objects.php10
-rw-r--r--engine/tests/objects/sites.php4
-rw-r--r--engine/tests/objects/users.php10
-rw-r--r--engine/tests/ui/submenu.php2
5 files changed, 15 insertions, 15 deletions
diff --git a/engine/tests/objects/entities.php b/engine/tests/objects/entities.php
index 8e7e30c5b..590e404d8 100644
--- a/engine/tests/objects/entities.php
+++ b/engine/tests/objects/entities.php
@@ -29,8 +29,8 @@ class ElggCoreEntityTest extends ElggCoreUnitTest {
$test_attributes['guid'] = NULL;
$test_attributes['type'] = NULL;
$test_attributes['subtype'] = NULL;
- $test_attributes['owner_guid'] = get_loggedin_userid();
- $test_attributes['container_guid'] = get_loggedin_userid();
+ $test_attributes['owner_guid'] = elgg_get_logged_in_user_guid();
+ $test_attributes['container_guid'] = elgg_get_logged_in_user_guid();
$test_attributes['site_guid'] = NULL;
$test_attributes['access_id'] = ACCESS_PRIVATE;
$test_attributes['time_created'] = NULL;
diff --git a/engine/tests/objects/objects.php b/engine/tests/objects/objects.php
index 55734be13..0d0df6b75 100644
--- a/engine/tests/objects/objects.php
+++ b/engine/tests/objects/objects.php
@@ -41,8 +41,8 @@ class ElggCoreObjectTest extends ElggCoreUnitTest {
$attributes['guid'] = NULL;
$attributes['type'] = 'object';
$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;
@@ -87,11 +87,11 @@ class ElggCoreObjectTest extends ElggCoreUnitTest {
public function testElggObjectLoad() {
// fail on wrong type
try {
- $error = new ElggObjectTest(get_loggedin_userid());
+ $error = new ElggObjectTest(elgg_get_logged_in_user_guid());
$this->assertTrue(FALSE);
} catch (Exception $e) {
$this->assertIsA($e, 'InvalidClassException');
- $message = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), get_loggedin_userid(), 'ElggObject');
+ $message = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), elgg_get_logged_in_user_guid(), 'ElggObject');
$this->assertIdentical($e->getMessage(), $message);
}
}
@@ -144,7 +144,7 @@ class ElggCoreObjectTest extends ElggCoreUnitTest {
}
public function testElggObjectContainer() {
- $this->assertEqual($this->entity->getContainerGUID(), get_loggedin_userid());
+ $this->assertEqual($this->entity->getContainerGUID(), elgg_get_logged_in_user_guid());
// create and save to group
$group = new ElggGroup();
diff --git a/engine/tests/objects/sites.php b/engine/tests/objects/sites.php
index 4d079c30f..d0d61dcab 100644
--- a/engine/tests/objects/sites.php
+++ b/engine/tests/objects/sites.php
@@ -44,8 +44,8 @@ class ElggCoreSiteTest extends ElggCoreUnitTest {
$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;
diff --git a/engine/tests/objects/users.php b/engine/tests/objects/users.php
index c0566c9b4..ba93c2439 100644
--- a/engine/tests/objects/users.php
+++ b/engine/tests/objects/users.php
@@ -49,8 +49,8 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
$attributes['guid'] = NULL;
$attributes['type'] = 'user';
$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;
@@ -98,7 +98,7 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
}
public function testElggUserConstructorByGuid() {
- $user = new ElggUser(get_loggedin_userid());
+ $user = new ElggUser(elgg_get_logged_in_user_guid());
$this->assertIdentical($user, $_SESSION['user']);
// fail with garbage
@@ -113,13 +113,13 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
}
public function testElggUserConstructorByDbRow() {
- $row = $this->fetchUser(get_loggedin_userid());
+ $row = $this->fetchUser(elgg_get_logged_in_user_guid());
$user = new ElggUser($row);
$this->assertIdentical($user, $_SESSION['user']);
}
public function testElggUserConstructorByUsername() {
- $row = $this->fetchUser(get_loggedin_userid());
+ $row = $this->fetchUser(elgg_get_logged_in_user_guid());
$user = new ElggUser($row->username);
$this->assertIdentical($user, $_SESSION['user']);
}
diff --git a/engine/tests/ui/submenu.php b/engine/tests/ui/submenu.php
index 3121d9e5a..b401620f6 100644
--- a/engine/tests/ui/submenu.php
+++ b/engine/tests/ui/submenu.php
@@ -100,4 +100,4 @@ elgg_add_submenu_item(array('text' => 'All test', 'href' => "$url?all"), 'all');
$body = elgg_view_layout('one_sidebar', array('content' => 'Look right.'));
echo elgg_view_page('Submenu Test', $body);
-*/ \ No newline at end of file
+*/