Exemplo n.º 1
0
 /**
  *
  * Generates cache file name based on URL, Strategy, and SessionHandler
  *
  */
 private function generateCacheFile()
 {
     //cache file name already generated?
     if (!empty($this->file)) {
         return;
     }
     try {
         $fname = $this->strategy->strategy();
         $hashDirectory = new HashDirectory($fname, $this->cache_path);
         $dir_str = $hashDirectory->getHash();
         $this->file = $this->cache_path . $dir_str . $fname;
     } catch (\Exception $e) {
         $this->log(__METHOD__ . ' Exception', $e);
     }
     $this->log(__METHOD__ . ' Cache file: ' . $this->file);
 }
Exemplo n.º 2
0
 /**
  * @expectedException \Exception
  */
 public function testCreateSubDirsWithException()
 {
     //make cache directory non writable, this will prevent from them being created
     chmod($this->dir, '000');
     $this->hd->getHash();
 }