* This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ namespace Test\Memcache; class Cache extends \Test_Cache { public function testExistsAfterSet() { $this->assertFalse($this->instance->hasKey('foo')); $this->instance->set('foo', 'bar'); $this->assertTrue($this->instance->hasKey('foo')); } public function testGetAfterSet() { $this->assertNull($this->instance->get('foo')); $this->instance->set('foo', 'bar'); $this->assertEquals('bar', $this->instance->get('foo')); } public function testDoesNotExistAfterRemove() { $this->instance->set('foo', 'bar'); $this->instance->remove('foo'); $this->assertFalse($this->instance->hasKey('foo')); } public function tearDown() { if ($this->instance) { $this->instance->clear(); } } }