示例#1
0
 /**
  * @param string
  *      The full path of the draft file
  * @throws \Exception
  *      If the file is not a valid draft
  */
 public function __construct($path)
 {
     if (!$this->isDraft($path)) {
         throw new \InvalidArgumentException("'" . $path . "' is not a valid draft.");
     }
     parent::__construct($path);
 }
示例#2
0
 public function testPostFileRead()
 {
     $postFile = new PostFile($this->testFile);
     $this->assertEquals(file_get_contents($this->testFile), $postFile->read());
     return $postFile;
 }