/** * Loads the file into memory. * * @throws \Sonrisa\Component\FileReader\Exceptions\FileReaderException */ protected static function load($filePath) { try { return File::read($filePath); } catch (FileSystemException $e) { throw new FileReaderException($e); } }
public function testFileReadNonExistentFile() { $this->setExpectedException('Sonrisa\\Component\\FileSystem\\Exceptions\\FileSystemException'); $file = '/THIS/DIRECTORY/DOES/NOT/EXIST/' . $this->filename; File::read($file); }