1 | <?php |
||
6 | class ClassFinderTest extends \PHPUnit_Framework_TestCase |
||
7 | { |
||
8 | /** |
||
9 | * @dataProvider provideScenarios |
||
10 | * @param string $className |
||
11 | * @param array $expectedFoundClasses |
||
12 | */ |
||
13 | public function testClassSearch($className, $expectedFoundClasses) |
||
28 | |||
29 | /** |
||
30 | * Test that the Log will output - fixed to cover |
||
31 | */ |
||
32 | public function testLogOutput() |
||
33 | { |
||
34 | $classFinder = new ClassFinder( |
||
35 | realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR, |
||
36 | \Fixture\BaseInterface::class |
||
37 | ); |
||
38 | |||
39 | $loggerMock = $this->getMockBuilder( |
||
40 | LoggerInterface::class |
||
41 | ); |
||
42 | $loggerMock = $loggerMock->getMock(); |
||
43 | $loggerMock->expects($this->atLeastOnce()) |
||
44 | ->method('log') |
||
45 | ->will($this->returnValue(null)); |
||
46 | |||
47 | $classFinder->setLogger( |
||
48 | $loggerMock |
||
49 | ); |
||
50 | |||
51 | $classFinder->findClasses(); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function provideScenarios() |
||
85 | } |
||
86 |