/**
  * @depends testDirIsCreated
  * @expectedException \Spiechu\JSONDiskCache\JSONDiskCacheException
  * @expectedExceptionMessage Permission denied
  */
 public function testIllegalDirLocation()
 {
     $perms = 0111;
     $errDir = $this->testDir . DIRECTORY_SEPARATOR . 'dir_perm_err';
     if (mkdir($errDir, $perms)) {
         $this->setupFiles->setupCacheDir($errDir . DIRECTORY_SEPARATOR . 'err', $perms);
     }
 }
示例#2
0
 /**
  * Creates new dir if not exist from $this->_cacheDir path.
  *
  * @throws JSONDiskCacheException when $this->_cacheDir is not a dir or is not readable/writable
  */
 protected function setupCacheDir()
 {
     $this->setupFiles->setupCacheDir($this->cacheDir, self::CACHE_DIR_PERMS);
 }