From 2d3d238c433cf69caeb4842e97a3223a116f94b2 Mon Sep 17 00:00:00 2001 From: Jaapio Date: Wed, 30 Aug 2017 20:32:38 +0200 Subject: [PATCH] Adds name to example tag --- src/DocBlock/Tags/Example.php | 1 + tests/unit/DocBlock/Tags/ExampleTest.php | 1 + 2 files changed, 2 insertions(+) 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()); } /**