diff --git a/src/DocBlock/Tags/Example.php b/src/DocBlock/Tags/Example.php index f56222d..b77a934 100644 --- a/src/DocBlock/Tags/Example.php +++ b/src/DocBlock/Tags/Example.php @@ -51,6 +51,7 @@ final class Example extends BaseTag $this->filePath = $filePath; $this->startingLine = $startingLine; $this->lineCount = $lineCount; + $this->name = 'example'; if ($description !== null) { $this->description = trim($description); } diff --git a/tests/unit/DocBlock/Tags/ExampleTest.php b/tests/unit/DocBlock/Tags/ExampleTest.php index d70f226..7a30f23 100644 --- a/tests/unit/DocBlock/Tags/ExampleTest.php +++ b/tests/unit/DocBlock/Tags/ExampleTest.php @@ -20,6 +20,7 @@ class ExampleTest extends \PHPUnit_Framework_TestCase $tag = Example::create('"example1.php"'); $this->assertEquals('"example1.php"', $tag->getContent()); $this->assertEquals('', $tag->getDescription()); + $this->assertEquals('example', $tag->getName()); } /**