/** * Test that the phpDocumentor_Reflection_DocBlock_Tag_See can create a link * for the @see doc block. * * @param string $type * @param string $content * @param string $exContent * @param string $exReference * * @covers \phpDocumentor\Reflection\DocBlock\Tag\SeeTag * @dataProvider provideDataForConstuctor * * @return void */ public function testConstructorParesInputsIntoCorrectFields($type, $content, $exContent, $exDescription, $exReference) { $tag = new SeeTag($type, $content); $this->assertEquals($type, $tag->getName()); $this->assertEquals($exContent, $tag->getContent()); $this->assertEquals($exDescription, $tag->getDescription()); $this->assertEquals($exReference, $tag->getReference()); }
/** * Constructor * * @param str text The contents of the tag * @param str[] data Reference to doc comment data array * @param RootDoc root The root object */ function throwsTag($text, &$data, &$root) { $explode = preg_split('/[ \\t]+/', $text); $this->_link = array_shift($explode); $data['throws'][$this->_link] = $this->_link; parent::tag('@throws', join(' ', $explode), $root); }
/** * Constructor * * @param str text The contents of the tag * @param str[] data Reference to doc comment data array * @param RootDoc root The root object */ function linkPlainTag($text, &$data, &$root) { $explode = preg_split('/[ \\t]+/', $text); $link = array_shift($explode); if ($link) { $this->_link = $link; $text = join(' ', $explode); } else { $this->_link = NULL; } parent::tag('@linkplain', $text, $root); }