aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/objects/users.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-08 12:46:53 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-08 12:46:53 +0000
commit1b2a453410488addb98d8c7f769bfd29720093df (patch)
tree4085c5278bd3396b59fc9f58e486323e2d2f92b7 /engine/tests/objects/users.php
parentad8408a69a1910ae8759dd92d7735ab2ea99cda4 (diff)
downloadelgg-1b2a453410488addb98d8c7f769bfd29720093df.tar.gz
elgg-1b2a453410488addb98d8c7f769bfd29720093df.tar.bz2
fixes #1305 - user and entity cache now cleared on delete
git-svn-id: http://code.elgg.org/elgg/trunk@3743 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests/objects/users.php')
-rw-r--r--engine/tests/objects/users.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/engine/tests/objects/users.php b/engine/tests/objects/users.php
index ace683a82..c1403af1a 100644
--- a/engine/tests/objects/users.php
+++ b/engine/tests/objects/users.php
@@ -162,6 +162,20 @@ class ElggCoreUserTest extends ElggCoreUnitTest {
$this->assertFalse($this->fetchUser($guid));
}
+ public function testElggUserNameCache() {
+ // Trac #1305
+
+ // very unlikely a user would have this username
+ $name = (string)time();
+ $this->user->username = $name;
+
+ $guid = $this->user->save();
+
+ $user = get_user_by_username($name);
+ $user->delete();
+ $user = get_user_by_username($name);
+ $this->assertFalse($user);
+ }
protected function fetchUser($guid) {
global $CONFIG;