diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-03-14 12:34:11 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-03-14 12:39:34 +0100 |
commit | 2f67aa9bc41df280c9ac869b0387710eb3995ed1 (patch) | |
tree | 2b67fa1693f94b58af94d4e9e4ea91c15ab4e787 /tests | |
parent | e0998c27ff205566db7799dce177192d2b776bc1 (diff) | |
download | nextcloud-server-2f67aa9bc41df280c9ac869b0387710eb3995ed1.tar.gz nextcloud-server-2f67aa9bc41df280c9ac869b0387710eb3995ed1.zip |
Fix errors in memcached implementation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/memcache/cache.php | 9 |
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')); |