| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class DiffFileLoaderOldVersionTest extends TestCase |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @dataProvider getResults |
||
| 11 | */ |
||
| 12 | public function testDiffResultsMatch($file, $expected) |
||
| 13 | { |
||
| 14 | $changed = $this->getChangedLines($file); |
||
| 15 | |||
| 16 | $this->assertEquals($expected, $changed); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getResults() |
||
| 20 | { |
||
| 21 | return [ |
||
| 22 | 'newFile' => [ |
||
| 23 | __DIR__ . '/fixtures/newFile.txt', |
||
| 24 | [ |
||
| 25 | 'dev/null' => [-1] |
||
| 26 | ] |
||
| 27 | ], |
||
| 28 | 'lineChange' => [ |
||
| 29 | __DIR__ . '/fixtures/change.txt', |
||
| 30 | [ |
||
| 31 | 'changedFile.php' => [3] |
||
| 32 | ] |
||
| 33 | ], |
||
| 34 | 'multipleFiles' => [ |
||
| 35 | __DIR__ . '/fixtures/multiple.txt', |
||
| 36 | [ |
||
| 37 | 'changedFile.php' => [3], |
||
| 38 | 'dev/null' => [-1], |
||
| 39 | 'deletedFile.php' => [1,2,3] |
||
| 40 | ] |
||
| 41 | ], |
||
| 42 | 'removeFile' => [ |
||
| 43 | __DIR__ . '/fixtures/removeFile.txt', |
||
| 44 | [ |
||
| 45 | 'deletedFile.php' => [1,2,3] |
||
| 46 | ] |
||
| 47 | ], |
||
| 48 | ]; |
||
| 49 | } |
||
| 50 | |||
| 51 | private function getChangedLines($file) |
||
| 55 | } |
||
| 56 | } |
||
| 57 |