summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-06-15 14:09:06 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-06-15 14:09:06 +0200
commitde3ed8e077f028d66dacb9bc9330e283342f2c66 (patch)
treed9e54569de78cfa86fc307ccb7eac00e0cab6d5e /tests
parent433db4802780f358ebf31c11e8ae898ffdb78fed (diff)
parenta9ff242f6abd54c9f8d55d5818b658b76d7807b3 (diff)
downloadnextcloud-server-de3ed8e077f028d66dacb9bc9330e283342f2c66.tar.gz
nextcloud-server-de3ed8e077f028d66dacb9bc9330e283342f2c66.zip
Merge pull request #16821 from owncloud/compare-and-delete-locking-watch
Compare and delete locking watch
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/memcache/cache.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lib/memcache/cache.php b/tests/lib/memcache/cache.php
index 9d977cf0247..3ff72ee931c 100644
--- a/tests/lib/memcache/cache.php
+++ b/tests/lib/memcache/cache.php
@@ -103,6 +103,18 @@ abstract class Cache extends \Test_Cache {
$this->assertEquals('bar1', $this->instance->get('foo'));
}
+ public function testCadNotChanged() {
+ $this->instance->set('foo', 'bar');
+ $this->assertTrue($this->instance->cad('foo', 'bar'));
+ $this->assertFalse($this->instance->hasKey('foo'));
+ }
+
+ public function testCadChanged() {
+ $this->instance->set('foo', 'bar1');
+ $this->assertFalse($this->instance->cad('foo', 'bar'));
+ $this->assertTrue($this->instance->hasKey('foo'));
+ }
+
protected function tearDown() {
if ($this->instance) {