SymfonyFinderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 12
c 1
b 0
f 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A itShouldReturnAllFilesInPath() 0 12 1
A setUp() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gember\FileFinderSymfony\Test;
6
7
use Gember\FileFinderSymfony\SymfonyFinder;
0 ignored issues
show
Bug introduced by
The type Gember\FileFinderSymfony\SymfonyFinder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Gember\FileFinderSymfony\SymfonyFinderFactory;
0 ignored issues
show
Bug introduced by
The type Gember\FileFinderSymfony\SymfonyFinderFactory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use PHPUnit\Framework\Attributes\Test;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\Attributes\Test was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use PHPUnit\Framework\TestCase;
11
12
/**
13
 * @internal
14
 */
15
final class SymfonyFinderTest extends TestCase
16
{
17
    private SymfonyFinder $finder;
18
19
    protected function setUp(): void
20
    {
21
        parent::setUp();
22
23
        $this->finder = new SymfonyFinder(new SymfonyFinderFactory());
24
    }
25
26
    #[Test]
27
    public function itShouldReturnAllFilesInPath(): void
28
    {
29
        $files = $this->finder->getFiles(__DIR__ . '/TestDoubles');
30
31
        sort($files);
32
33
        self::assertSame([
34
            __DIR__ . '/TestDoubles/Subfolder/AnotherClass.php',
35
            __DIR__ . '/TestDoubles/Subfolder/TestClass.php',
36
            __DIR__ . '/TestDoubles/TestClass.php',
37
        ], $files);
38
    }
39
}
40