Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function testRun($filenames, $expected) |
||
18 | { |
||
19 | // Set up the Finder mock |
||
20 | $finder = $this->getMockBuilder(Finder::class) |
||
21 | ->setMethods(['directories', 'in', 'name']) |
||
22 | ->getMock(); |
||
23 | |||
24 | $finder->expects($this->once())->method('directories')->will($this->returnSelf()); |
||
25 | $finder->expects($this->once())->method('in')->will($this->returnSelf()); |
||
26 | $finder->expects($this->once())->method('name')->willReturn($filenames); |
||
27 | |||
28 | $check = new DocumentationCheck(); |
||
29 | $check->setSuite(new CheckSuite()); |
||
30 | $check->setFinder($finder); |
||
31 | $check->run(); |
||
32 | |||
33 | $this->assertSame($expected, $check->getSuccessful()); |
||
34 | } |
||
47 |