diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-12-21 21:06:29 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-12-21 21:06:41 +0100 |
commit | 065f2fbcc607467032d8373a4593479e33be55de (patch) | |
tree | d433cdd4fcdc0ae8ec3bf3ccd56e3f48527ac5b5 /tests/lib/Memcache/APCuTest.php | |
parent | d5036fd4af9cf29c666a526dfb03f7e261cbc951 (diff) | |
download | nextcloud-server-065f2fbcc607467032d8373a4593479e33be55de.tar.gz nextcloud-server-065f2fbcc607467032d8373a4593479e33be55de.zip |
Extend APCu test with int CAS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Memcache/APCuTest.php')
-rw-r--r-- | tests/lib/Memcache/APCuTest.php | 12 |
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')); + } } |