Example #1
0
 /**
  * @covers Opc_View_Cache::setCacheDir
  * @covers Opc_View_Cache::getCacheDir
  */
 public function testCacheDirSetters()
 {
     $viewCache = new Opc_View_Cache();
     $this->assertSame('', $viewCache->getCacheDir());
     $viewCache->setCacheDir('./bar/');
     $this->assertSame('./bar/', $viewCache->getCacheDir());
     $viewCache->setCacheDir('./foo');
     $this->assertSame('./foo/', $viewCache->getCacheDir());
 }
Example #2
0
 /**
  * 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;
 }