/** * @test * @expectedException RuntimeException */ public function throwRuntimeExceptionOnReadIfPathIsNotReadable() { $this->touchUnreadableFile(); FileValidator::canRead($this->unreadablePath, $this->throwException); }
/** * Return whether the file is readable. * * @return boolean true if the file is readable. * @throws \RuntimeException Throw if the file is not readable and $throwException is set to true. */ public function isReadable() { return FileValidator::canRead($this->path, $this->throwException); }