예제 #1
0
 /**
  * @test
  * @expectedException RuntimeException
  */
 public function throwRuntimeExceptionOnWriteIfPathIsNotWritable()
 {
     $this->touchUnwritableFile();
     FileValidator::canWrite($this->unwritablePath, $this->throwException);
 }
예제 #2
0
 /**
  * Return whether the file is writable.
  *
  * @return boolean true if the file is writable.
  * @throws \RuntimeException Throw if the file is not writable and $throwException is set to true.
  */
 public function isWritable()
 {
     return FileValidator::canWrite($this->path, $this->throwException);
 }