summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-22 10:09:16 +0100
committerGitHub <noreply@github.com>2016-12-22 10:09:16 +0100
commit86066028de3e05f1b521701f756a248233c91b0b (patch)
tree0ec57f8eb5176c9a0d29d9982ced6fade904d11a
parentf88d6154452993a9af0f5be71f532c6d8ddc1836 (diff)
parent065f2fbcc607467032d8373a4593479e33be55de (diff)
downloadnextcloud-server-86066028de3e05f1b521701f756a248233c91b0b.tar.gz
nextcloud-server-86066028de3e05f1b521701f756a248233c91b0b.zip
Merge pull request #2811 from nextcloud/extended_apcu_cas
Extend APCu test with int CAS
-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'));
+ }
}