/** * @test */ public function createCashDirAndFileWithRange() { $fp = new FilePager($this->goodFile); $fp->setCache($this->goodCache); $fp->getRange(1, 20); $cacheDir = $fp->getCache()->getDir(); $file = $cacheDir . '/' . $fp->getCache()->getCachedFileName(); $this->assertTrue(is_dir($cacheDir), "Cannot locate cache directory: {$cacheDir}"); $this->assertTrue(is_file($file), "Cannot create cache file: {$file}"); $this->assertTrue(is_readable($file), "Don't have permission to read file: {$file}"); $this->assertTrue(is_writable($file), "Don't have permission to write in file: {$file}"); }