From 1d3a5e858585aeb4e26fadcc09965cda18ad804a Mon Sep 17 00:00:00 2001 From: Jaapio Date: Wed, 30 Aug 2017 20:25:28 +0200 Subject: [PATCH] Fixes namespace error in ExampleFinder --- src/DocBlock/ExampleFinder.php | 2 +- tests/unit/DocBlock/ExampleFinderTest.php | 32 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tests/unit/DocBlock/ExampleFinderTest.php diff --git a/src/DocBlock/ExampleFinder.php b/src/DocBlock/ExampleFinder.php index 3cc5dab..ea79f7c 100644 --- a/src/DocBlock/ExampleFinder.php +++ b/src/DocBlock/ExampleFinder.php @@ -10,7 +10,7 @@ * @link http://phpdoc.org */ -namespace phpDocumentor\Reflection; +namespace phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock\Tags\Example; diff --git a/tests/unit/DocBlock/ExampleFinderTest.php b/tests/unit/DocBlock/ExampleFinderTest.php new file mode 100644 index 0000000..6e083d4 --- /dev/null +++ b/tests/unit/DocBlock/ExampleFinderTest.php @@ -0,0 +1,32 @@ + + */ +class ExampleFinderTest extends \PHPUnit_Framework_TestCase +{ + /** @var ExampleFinder */ + private $fixture; + + public function setUp() + { + $this->fixture = new ExampleFinder(); + } + + /** + * @covers ::find + * @covers ::getSourceDirectory + * @uses \phpDocumentor\Reflection\DocBlock\Tags\Example + * @uses \phpDocumentor\Reflection\DocBlock\Description + */ + public function testFileNotFound() + { + $example = new Example('./example.php', false, 1, 0, new Description('Test')); + $this->assertSame('** File not found : ./example.php **', $this->fixture->find($example)); + } +}