public function testExample() { $data = DATA_DIR . DIRECTORY_SEPARATOR . 'example.readme'; $data = Baikonur_ReadmeParser::parse_readme($data); $this->assertEquals('Plugin Name', $data->name); $this->assertEquals(array('markjaquith', 'mdawaffe'), $data->contributors); $this->assertEquals('http://example.com/', $data->donate_link); $this->assertEquals(array('comments', 'spam'), $data->tags); $this->assertEquals('2.0.2', $data->requires); $this->assertEquals('2.1', $data->tested); $this->assertEquals('4.3', $data->stable_tag); $this->assertEquals('Here is a short description of the plugin.' . ' This should be no more than 150 characters. No markup here.', $data->short_description); $this->assertEquals("This screen shot description corresponds to" . " screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from\n" . "the directory of the stable readme.txt, so in this case," . " <code>/tags/4.3/screenshot-1.png</code> (or jpg, jpeg, gif)", $data->screenshots[0]); $this->assertEquals('This is the second screen shot', $data->screenshots[1]); }
protected static function trim_short_desc(&$desc) { $desc = self::sanitize_text($desc); return parent::trim_short_desc($desc); }