public function testGetFilenameWithPublicDirAndNoPageId() { $_SERVER['REQUEST_URI'] = '/dir1/test.html'; $options = new Cache\Pattern\PatternOptions(array('public_dir' => $this->_tmpCacheDir)); $captureCache = new Cache\Pattern\CaptureCache(); $captureCache->setOptions($options); $this->assertEquals($this->_tmpCacheDir . str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test.html'), $captureCache->getFilename()); }
public function testRemoveThrowsLogicExceptionOnMissingPublicDir() { $captureCache = new Cache\Pattern\CaptureCache(); $this->setExpectedException('Zend\\Cache\\Exception\\LogicException'); $captureCache->remove('/pageId'); }