aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-12-21 21:06:29 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-12-21 21:06:41 +0100
commit065f2fbcc607467032d8373a4593479e33be55de (patch)
treed433cdd4fcdc0ae8ec3bf3ccd56e3f48527ac5b5
parentd5036fd4af9cf29c666a526dfb03f7e261cbc951 (diff)
downloadnextcloud-server-065f2fbcc607467032d8373a4593479e33be55de.tar.gz
nextcloud-server-065f2fbcc607467032d8373a4593479e33be55de.zip
Extend APCu test with int CAS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--tests/lib/Memcache/APCuTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lib/Memcache/APCuTest.php b/tests/lib/Memcache/APCuTest.php
index 73fd5a12880..41de75a8ea8 100644
--- a/tests/lib/Memcache/APCuTest.php
+++ b/tests/lib/Memcache/APCuTest.php
@@ -19,4 +19,16 @@ class APCuTest extends Cache {
}
$this->instance=new \OC\Memcache\APCu($this->getUniqueID());
}
+
+ public function testCasIntChanged() {
+ $this->instance->set('foo', 1);
+ $this->assertTrue($this->instance->cas('foo', 1, 2));
+ $this->assertEquals(2, $this->instance->get('foo'));
+ }
+
+ public function testCasIntNotChanged() {
+ $this->instance->set('foo', 1);
+ $this->assertFalse($this->instance->cas('foo', 2, 3));
+ $this->assertEquals(1, $this->instance->get('foo'));
+ }
}