示例#1
0
 /**
  * @dataProvider descriptionProvider
  *
  * @param string   $expectedShort
  * @param string   $expectedLong
  * @param string[] $expectedTagNames
  * @param string   $comment
  */
 public function testDescription($expectedShort, $expectedLong, $expectedTagNames, $comment)
 {
     $docBlock = new DocBlock($comment);
     $this->assertSame($expectedShort, $docBlock->getShortDescription());
     $this->assertSame($expectedLong, $docBlock->getLongDescription()->getContents());
     $tags = $docBlock->getTags();
     $tagNames = array_map(function ($tag) {
         return $tag->getName();
     }, $tags);
     $this->assertSame($expectedTagNames, $tagNames);
 }