Completed
Push — develop ( 1aa11f...71fd61 )
by Jaap
03:29
created

FlySystemCollectorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0
rs 10
wmc 1
lcom 0
cbo 6

1 Method

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