Ejemplo n.º 1
0
 /**
  * @depends testDirIsCreated
  */
 public function testCreatingBasicHashFile()
 {
     $hashFilename = 'basic_hash.hash';
     $result = $this->setupFiles->setupFile(new \SplFileInfo($this->testDir), $hashFilename, 0777);
     $this->assertInstanceOf('\\SplFileInfo', $result);
     $this->assertTrue(is_file($result), 'File should be created');
 }
Ejemplo n.º 2
0
 /**
  * Checks if cache file exists and is ready to read/write.
  *
  * Creates a new file when not found.
  *
  * @return SplFileInfo                 full path to cache file
  * @throws JSONDiskCacheException when not a file or is not readable/writable
  */
 protected function setupCacheFile()
 {
     $file = $this->setupFiles->setupFile(new \SplFileInfo($this->cacheDir), (new \SplFileInfo($this->constructFullCacheFilenamePath($this->domain)))->getFilename(), self::CACHE_FILE_PERMS);
     return $file;
 }