summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-03-14 12:34:11 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-03-14 16:13:35 +0100
commit9190885b4e0bdcec4c7f3fafd3f0eb2dd727c716 (patch)
tree1d466e21944690fbb69f74fe0b375cb7a1d25ceb /tests
parent5c38c1c8454d10a46fcd58eab82f5732f9c431a1 (diff)
downloadnextcloud-server-9190885b4e0bdcec4c7f3fafd3f0eb2dd727c716.tar.gz
nextcloud-server-9190885b4e0bdcec4c7f3fafd3f0eb2dd727c716.zip
Fix errors in memcached implementation
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/memcache/cache.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/lib/memcache/cache.php b/tests/lib/memcache/cache.php
index 3ff72ee931c..725b0fbbf57 100644
--- a/tests/lib/memcache/cache.php
+++ b/tests/lib/memcache/cache.php
@@ -39,6 +39,11 @@ abstract class Cache extends \Test_Cache {
$this->assertFalse($this->instance->hasKey('foo'));
}
+ public function testRemoveNonExisting() {
+ $this->instance->remove('foo');
+ $this->assertFalse($this->instance->hasKey('foo'));
+ }
+
public function testArrayAccessSet() {
$this->instance['foo'] = 'bar';
$this->assertEquals('bar', $this->instance->get('foo'));
@@ -72,7 +77,9 @@ abstract class Cache extends \Test_Cache {
$this->assertEquals(1, $this->instance->inc('foo'));
$this->assertEquals(1, $this->instance->get('foo'));
$this->assertEquals(2, $this->instance->inc('foo'));
+ $this->assertEquals(2, $this->instance->get('foo'));
$this->assertEquals(12, $this->instance->inc('foo', 10));
+ $this->assertEquals(12, $this->instance->get('foo'));
$this->instance->set('foo', 'bar');
$this->assertFalse($this->instance->inc('foo'));
@@ -80,7 +87,7 @@ abstract class Cache extends \Test_Cache {
}
public function testDec() {
- $this->assertEquals(false, $this->instance->dec('foo'));
+ $this->assertFalse($this->instance->dec('foo'));
$this->instance->set('foo', 20);
$this->assertEquals(19, $this->instance->dec('foo'));
$this->assertEquals(19, $this->instance->get('foo'));