Completed
Push — develop ( 7858d8...735899 )
by Jaap
05:56
created

ResolveInlineMarkersTest::testExecuteSetsMarkers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 24
rs 9.536
c 0
b 0
f 0
1
<?php
2
/**
3
 *  This file is part of phpDocumentor.
4
 *
5
 *  For the full copyright and license information, please view the LICENSE
6
 *  file that was distributed with this source code.
7
 *
8
 *  @copyright 2010-2018 Mike van Riel<[email protected]>
9
 *  @license   http://www.opensource.org/licenses/mit-license.php MIT
10
 *  @link      http://phpdoc.org
11
 */
12
13
namespace phpDocumentor\Compiler\Pass;
14
15
use phpDocumentor\Descriptor\Collection;
16
use phpDocumentor\Descriptor\FileDescriptor;
17
use phpDocumentor\Descriptor\ProjectDescriptor;
18
19
final class ResolveInlineMarkersTest extends \Mockery\Adapter\Phpunit\MockeryTestCase
20
{
21
    public function testExecuteSetsMarkers()
22
    {
23
        $fixture = new ResolveInlineMarkers();
24
25
        $fileDescriptor = new FileDescriptor('abc');
26
        $fileDescriptor->setSource(
27
            <<<SOURCE
28
                <?php
29
                
30
                class Marker
31
                {
32
                   //TODO: implement this
33
                }      
34
SOURCE
35
);
36
37
        $projectDescriptor = new ProjectDescriptor('test project');
38
        $projectDescriptor->getSettings()->setMarkers(['TODO']);
39
        $projectDescriptor->setFiles(new Collection([$fileDescriptor]));
40
41
        $fixture->execute($projectDescriptor);
42
43
        self::assertCount(1, $fileDescriptor->getMarkers());
44
    }
45
}
46