Completed
Pull Request — master (#15)
by
unknown
05:30
created

FindOnSamplePhpdocLayout::algorithms()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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 Flyfinder;
14
15
use PHPUnit\Framework\TestCase;
16
17
/**
18
 * Integration test against examples/03-sample-phpdoc-layout.php
19
 * @coversNothing
20
 */
21
class FindOnSamplePhpdocLayout extends TestCase
22
{
23
    use TestsBothAlgorithms;
24
    /**
25
     * @param int $finderAlgorithm
26
     * @dataProvider algorithms
27
     */
28
    public function testFindingOnSamplePhpdocLayout(int $finderAlgorithm)
29
    {
30
        $result = [];
31
        include(__DIR__ . '/../../examples/03-sample-phpdoc-layout.php');
32
33
        $this->assertCount(4, $result);
34
        $this->assertSame('JmsSerializerServiceProvider.php', $result[0]['basename']);
35
        $this->assertSame('MonologServiceProvider.php', $result[1]['basename']);
36
        $this->assertSame('Application.php', $result[2]['basename']);
37
        $this->assertSame('Bootstrap.php', $result[3]['basename']);
38
    }
39
    public function algorithms() : array
40
    {
41
        return [
42
            [Finder::ALGORITHM_LEGACY],
43
            [Finder::ALGORITHM_OPTIMIZED]
44
        ];
45
    }
46
47
}
48