testGetEnabledPluginDirs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 *  This file is part of the Micro framework package.
7
 *
8
 *  (c) Stanislau Komar <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace Micro\Plugin\Doctrine\Test\Unit\Business\Locator;
15
16
use Micro\Framework\Kernel\KernelInterface;
17
use Micro\Plugin\Doctrine\Business\Locator\AttributeEntityFileConfigurationLocator;
0 ignored issues
show
Bug introduced by
The type Micro\Plugin\Doctrine\Bu...ileConfigurationLocator 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...
18
use PHPUnit\Framework\TestCase;
19
20
class AttributeEntityFileConfigurationLocatorTest extends TestCase
21
{
22
    public function testGetEnabledPluginDirs()
23
    {
24
        $kernel = $this->createMock(KernelInterface::class);
25
        $kernel->expects($this->once())
26
            ->method('plugins')
27
            ->willReturn(new \ArrayObject([
28
                new \stdClass(),
29
            ]))
30
        ;
31
32
        $locator = new AttributeEntityFileConfigurationLocator($kernel);
33
        $this->assertEquals([], $locator->getEnabledPluginDirs());
34
    }
35
}
36