/** * @covers Opc_View_Cache::setExpiryTime * @covers Opc_View_Cache::getExpiryTime */ public function testExpiryTimeSetters() { $viewCache = new Opc_View_Cache(); $this->assertSame(3600, $viewCache->getExpiryTime()); $viewCache->setExpiryTime(200); $this->assertSame(200, $viewCache->getExpiryTime()); $this->setExpectedException('Opc_InvalidArgumentType_Exception'); $viewCache->setExpiryTime('none'); }
/** * Constructs and pre-configures the caching object * using the default settings for the specified view. * * @param Opt_View $view The OPT view. * @return Opc_Cache */ public function cacheFactory(Opt_View $view) { $cache = new Opc_View_Cache($view); $cache->setExpiryTime($this->expiryTime); return $cache; }