Adds name to example tag

This commit is contained in:
Jaapio
2017-08-30 20:51:59 +02:00
committed by Jaap van Otterdijk
parent 1d3a5e8585
commit 2d3d238c43
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -51,6 +51,7 @@ final class Example extends BaseTag
$this->filePath = $filePath; $this->filePath = $filePath;
$this->startingLine = $startingLine; $this->startingLine = $startingLine;
$this->lineCount = $lineCount; $this->lineCount = $lineCount;
$this->name = 'example';
if ($description !== null) { if ($description !== null) {
$this->description = trim($description); $this->description = trim($description);
} }
+1
View File
@@ -20,6 +20,7 @@ class ExampleTest extends \PHPUnit_Framework_TestCase
$tag = Example::create('"example1.php"'); $tag = Example::create('"example1.php"');
$this->assertEquals('"example1.php"', $tag->getContent()); $this->assertEquals('"example1.php"', $tag->getContent());
$this->assertEquals('', $tag->getDescription()); $this->assertEquals('', $tag->getDescription());
$this->assertEquals('example', $tag->getName());
} }
/** /**