/** * @todo Implement testClean(). */ public function testClean() { $this->object->store(42, '_testing', 'And this is the cache that tries men\'s souls'); $this->object->store(43, '_testing', 'The summer coder and the sunshine developer.'); $this->object->store(44, '_nottesting', 'Now is the time for all good developers to cry'); $this->object->store(45, '_testing', 'Do not go gentle into that good night'); $this->assertThat($this->object->get(42, '_testing', true), $this->equalTo('And this is the cache that tries men\'s souls')); $this->assertThat($this->object->clean('_testing', 'group'), $this->isTrue()); $this->assertThat($this->object->get(42, '_testing', true), $this->isFalse()); $this->assertThat($this->object->get(43, '_testing', true), $this->isFalse()); $this->assertThat($this->object->get(44, '_nottesting', true), $this->equalTo('Now is the time for all good developers to cry')); $this->assertThat($this->object->get(45, '_testing', true), $this->isFalse()); $this->assertThat((bool) $this->object->clean('_testing', 'notgroup'), $this->equalTo(true)); $this->assertThat($this->object->get(44, '_nottesting', true), $this->isFalse()); }