Completed
Push — master ( 76844d...a0c467 )
by Tomáš
02:57
created

ControllerFinderTest::testFindControllersInDirs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 13
rs 9.4286
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Symplify\ControllerAutowire\Tests\HttpKernel\Controller;
4
5
use PHPUnit_Framework_TestCase;
6
use Symplify\ControllerAutowire\Contract\HttpKernel\ControllerFinderInterface;
7
use Symplify\ControllerAutowire\HttpKernel\Controller\ControllerFinder;
8
use Symplify\ControllerAutowire\Tests\HttpKernel\Controller\ControllerFinderSource\SomeController;
9
use Symplify\ControllerAutowire\Tests\HttpKernel\Controller\ControllerFinderSource\SomeOtherController;
10
11
final class ControllerFinderTest extends PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @var ControllerFinderInterface
15
     */
16
    private $controllerFinder;
17
18
    protected function setUp()
19
    {
20
        $this->controllerFinder = new ControllerFinder();
21
    }
22
23
    public function testFindControllersInDirs()
24
    {
25
        $controllers = $this->controllerFinder->findControllersInDirs([__DIR__.'/ControllerFinderSource']);
26
27
        $this->assertEquals(
28
            [SomeController::class, SomeOtherController::class],
29
            $controllers,
30
            '',
31
            0.0,
32
            10,
33
            true
34
        );
35
    }
36
}
37