Exemplo n.º 1
0
 public function setUp()
 {
     $this->_options = new Cache\Pattern\PatternOptions(array());
     $this->_pattern = new Cache\Pattern\CaptureCache();
     $this->_pattern->setOptions($this->_options);
     parent::setUp();
 }
Exemplo n.º 2
0
 public function setUp()
 {
     $this->_storage = new Cache\Storage\Adapter\Memory();
     $this->_options = new Cache\Pattern\PatternOptions(array('class' => __NAMESPACE__ . '\\TestClassCache', 'storage' => $this->_storage));
     $this->_pattern = new Cache\Pattern\ClassCache();
     $this->_pattern->setOptions($this->_options);
     parent::setUp();
 }
Exemplo n.º 3
0
 public function setUp()
 {
     $this->_storage = new Cache\Storage\Adapter\Memory(array('memory_limit' => 0));
     $this->_options = new Cache\Pattern\PatternOptions(array('storage' => $this->_storage));
     $this->_pattern = new Cache\Pattern\CallbackCache();
     $this->_pattern->setOptions($this->_options);
     parent::setUp();
 }
Exemplo n.º 4
0
 public function setUp()
 {
     $this->_storage = new Cache\Storage\Adapter\Memory();
     $this->_options = new Cache\Pattern\PatternOptions(array('storage' => $this->_storage));
     $this->_pattern = new Cache\Pattern\OutputCache();
     $this->_pattern->setOptions($this->_options);
     parent::setUp();
 }
Exemplo n.º 5
0
 public function setUp()
 {
     $class = __NAMESPACE__ . '\\TestObjectCache';
     $this->_storage = new Cache\Storage\Adapter\Memory();
     $this->_options = new Cache\Pattern\PatternOptions(array('object' => new $class(), 'storage' => $this->_storage));
     $this->_pattern = new Cache\Pattern\ObjectCache();
     $this->_pattern->setOptions($this->_options);
     parent::setUp();
 }
Exemplo n.º 6
0
 public function setUp()
 {
     $this->_storage = new Cache\Storage\Adapter\Memory(array('memory_limit' => 0));
     $this->_options = new Cache\Pattern\PatternOptions(array('storage' => $this->_storage));
     $this->_pattern = new Cache\Pattern\OutputCache();
     $this->_pattern->setOptions($this->_options);
     // used to reset the level on tearDown
     $this->_obLevel = ob_get_level();
     parent::setUp();
 }
Exemplo n.º 7
0
 public function setUp()
 {
     $this->_umask = umask();
     $this->_tmpCacheDir = @tempnam(sys_get_temp_dir(), 'zend_cache_test_');
     if (!$this->_tmpCacheDir) {
         $err = error_get_last();
         $this->fail("Can't create temporary cache directory-file: {$err['message']}");
     } elseif (!@unlink($this->_tmpCacheDir)) {
         $err = error_get_last();
         $this->fail("Can't remove temporary cache directory-file: {$err['message']}");
     } elseif (!@mkdir($this->_tmpCacheDir, 0777)) {
         $err = error_get_last();
         $this->fail("Can't create temporary cache directory: {$err['message']}");
     }
     $this->_options = new Cache\Pattern\PatternOptions(array('public_dir' => $this->_tmpCacheDir));
     $this->_pattern = new Cache\Pattern\CaptureCache();
     $this->_pattern->setOptions($this->_options);
     parent::setUp();
 }