Completed
Push — master ( 03b704...7524ab )
by Jaap
01:44
created

ExampleFinderTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 5
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 4 1
A setUp() 0 4 1
A testFileNotFound() 0 5 1
1
<?php
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()
22
    {
23
        m::close();
24
    }
25
26
    public function setUp()
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()
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