Completed
Pull Request — master (#120)
by Jaap
01:49
created

ExampleFinderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testFileNotFound() 0 5 1
1
<?php
2
3
namespace phpDocumentor\Reflection\DocBlock;
4
5
use phpDocumentor\Reflection\DocBlock\Tags\Example;
6
7
/**
8
 * @coversDefaultClass phpDocumentor\Reflection\DocBlock\ExampleFinder
9
 * @covers ::<private>
10
 */
11
class ExampleFinderTest extends \PHPUnit_Framework_TestCase
12
{
13
    /** @var ExampleFinder */
14
    private $fixture;
15
16
    public function setUp()
17
    {
18
        $this->fixture = new ExampleFinder();
19
    }
20
21
    /**
22
     * @covers ::find
23
     * @covers ::getSourceDirectory
24
     * @uses \phpDocumentor\Reflection\DocBlock\Tags\Example
25
     * @uses \phpDocumentor\Reflection\DocBlock\Description
26
     */
27
    public function testFileNotFound()
28
    {
29
        $example = new Example('./example.php', false, 1, 0, new Description('Test'));
30
        $this->assertSame('** File not found : ./example.php **', $this->fixture->find($example));
31
    }
32
}
33