/** * @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); }
public function testPostFileRead() { $postFile = new PostFile($this->testFile); $this->assertEquals(file_get_contents($this->testFile), $postFile->read()); return $postFile; }