Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function testAllFiles() |
||
10 | { |
||
11 | $source = function () { |
||
12 | return [ |
||
13 | 'src/Acme/', |
||
14 | 'src/Acme/Combinator.php', |
||
15 | 'src/Acme/Comparator.php', |
||
16 | 'src/Acme/config.yml', |
||
17 | 'test/Acme/data.dml', |
||
18 | 'test/Acme/AllTests.phpt', |
||
19 | 'README', |
||
20 | 'LICENSE', |
||
21 | ]; |
||
22 | }; |
||
23 | $fileList = new Change\FileList('', $source); |
||
24 | |||
25 | $this->assertCount(8, $fileList->toArray()); |
||
26 | $this->assertCount(2, $fileList->endingWith('.php')->toArray()); |
||
27 | $this->assertCount(4, $fileList->startingWith('src/')->toArray()); |
||
28 | $this->assertCount(6, $fileList->name('/Acme/')->toArray()); |
||
29 | } |
||
30 | } |
||
31 |