Completed
Pull Request — master (#145)
by Chuck
05:03
created

ExampleFinderTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace phpDocumentor\Reflection\DocBlock;
4
5
use Mockery as m;
6
use phpDocumentor\Reflection\DocBlock\Tags\Example;
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * @coversDefaultClass phpDocumentor\Reflection\DocBlock\ExampleFinder
11
 * @covers ::<private>
12
 */
13
class ExampleFinderTest extends TestCase
14
{
15
    /** @var ExampleFinder */
16
    private $fixture;
17
18
    /**
19
     * Call Mockery::close after each test.
20
     */
21
    public function tearDown(): void
22
    {
23
        m::close();
24
    }
25
26
    public function setUp(): void
27
    {
28
        $this->fixture = new ExampleFinder();
29
    }
30
31
    /**
32
     * @covers ::find
33
     * @covers ::getSourceDirectory
34
     * @uses \phpDocumentor\Reflection\DocBlock\Tags\Example
35
     * @uses \phpDocumentor\Reflection\DocBlock\Description
36
     */
37
    public function testFileNotFound(): void
38
    {
39
        $example = new Example('./example.php', false, 1, 0, new Description('Test'));
40
        $this->assertSame('** File not found : ./example.php **', $this->fixture->find($example));
41
    }
42
}
43