Browse Source
Extend APCu test with int CAS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/2811/head
Roeland Jago Douma
9 years ago
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with
12 additions and
0 deletions
-
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')); |
|
|
|
} |
|
|
|
} |