/** * @param DocBlock $docblock * @param $wrapLength * @return string */ private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength) { $text = $docblock->getSummary() . "\n\n" . $docblock->getDescription(); if ($wrapLength !== null) { $text = wordwrap($text, $wrapLength); return $text; } return $text; }
/** * @covers ::__construct * @covers ::getSummary * * @uses \phpDocumentor\Reflection\DocBlock\Description */ public function testDocBlockCanHaveASummary() { $summary = 'This is a summary'; $fixture = new DocBlock($summary); $this->assertSame($summary, $fixture->getSummary()); }