Completed
Push — develop ( 2993ce...48a3ec )
by Mike
09:32
created

FlySystemCollectorTest::testSingleSourceDir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 10
rs 9.9332
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\Parser;
14
15
use League\Flysystem\MountManager;
16
use phpDocumentor\Dsn;
17
use phpDocumentor\Parser\FlySystemFactory;
18
use phpDocumentor\Parser\FlySystemCollector;
19
use phpDocumentor\Parser\SpecificationFactoryInterface;
20
use PHPUnit\Framework\TestCase;
21
22
/**
23
 * @coversDefaultClass \phpDocumentor\Parser\FlySystemCollector
24
 */
25
class FlySystemCollectorTest extends TestCase
26
{
27
    /**
28
     * @covers ::getFiles()
29
     * @uses \phpDocumentor\Parser\SpecificationFactory
30
     * @uses \phpDocumentor\Parser\FlySystemFactory
31
     */
32
    public function testSingleSourceDir()
33
    {
34
        $fileCollector = new FlySystemCollector(
35
            new SpecificationFactory(),
36
            new FlySystemFactory(new MountManager())
37
        );
38
39
        $files = $fileCollector->getFiles(new Dsn('file://' . __DIR__ . '/assets'), [], [], ['php']);
40
        static::assertCount(3, $files);
41
    }
42
}
43