aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/api/access_collections.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-02-13 01:25:07 +0100
committerSem <sembrestels@riseup.net>2013-02-13 01:25:07 +0100
commit5aff5b3913fbb6226d8fb3162453c58888fba38d (patch)
tree2bf8fe649d8c9d09a3be03154c4c669bccfbc54c /engine/tests/api/access_collections.php
parent3ed289b03fa3d851fd7fffbc0441ebc9b5e98310 (diff)
parent8d3a7ab1755829c6e070a038d6b33e326de8fc8f (diff)
downloadelgg-5aff5b3913fbb6226d8fb3162453c58888fba38d.tar.gz
elgg-5aff5b3913fbb6226d8fb3162453c58888fba38d.tar.bz2
Merge tag '1.8.13' of git://github.com/Elgg/Elgg
Elgg 1.8.13 release
Diffstat (limited to 'engine/tests/api/access_collections.php')
-rw-r--r--engine/tests/api/access_collections.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/engine/tests/api/access_collections.php b/engine/tests/api/access_collections.php
index bea995a6e..ebcd7d318 100644
--- a/engine/tests/api/access_collections.php
+++ b/engine/tests/api/access_collections.php
@@ -268,4 +268,26 @@ class ElggCoreAccessCollectionsTest extends ElggCoreUnitTest {
$group->delete();
}
+
+ public function testAccessCaching() {
+ // create a new user to check against
+ $user = new ElggUser();
+ $user->username = 'access_test_user';
+ $user->save();
+
+ foreach (array('get_access_list', 'get_access_array') as $func) {
+ $cache = _elgg_get_access_cache();
+ $cache->clear();
+
+ // admin users run tests, so disable access
+ elgg_set_ignore_access(true);
+ $access = $func($user->getGUID());
+
+ elgg_set_ignore_access(false);
+ $access2 = $func($user->getGUID());
+ $this->assertNotEqual($access, $access2, "Access test for $func");
+ }
+
+ $user->delete();
+ }
}