public function testCleanOld() { $this->_model->save('long-living entity', 'long', [], 1000); $this->_model->save('infinite-living entity', 'infinite', [], null); $this->_model->save('short-living entity', 'short', [], 0); $this->_model->clean(\Zend_Cache::CLEANING_MODE_OLD); $expectedIds = ['long', 'infinite']; $actualIds = $this->_model->getIds(); $this->assertSame($expectedIds, $actualIds); }
/** * @expectedException \Zend_Cache_Exception * @expectedExceptionMessage Unsupported cleaning mode: invalid_mode */ public function testCleanInvalidMode() { $this->_model->clean('invalid_mode'); }