diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-15 14:09:06 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-15 14:09:06 +0200 |
commit | de3ed8e077f028d66dacb9bc9330e283342f2c66 (patch) | |
tree | d9e54569de78cfa86fc307ccb7eac00e0cab6d5e /tests | |
parent | 433db4802780f358ebf31c11e8ae898ffdb78fed (diff) | |
parent | a9ff242f6abd54c9f8d55d5818b658b76d7807b3 (diff) | |
download | nextcloud-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.php | 12 |
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) { |