Extend APCu test with int CAS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
d5036fd4af
commit
065f2fbcc6
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue