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

FlySystemCollectorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

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

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-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