Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
17 | 3 | public function checkHeaders(CsvFile $csv): void |
|
18 | { |
||
19 | 3 | $csv->move(3); |
|
20 | 3 | $expected = [ |
|
21 | 'Clave', |
||
22 | 'Tipo de contenedor', |
||
23 | 'Descripción', |
||
24 | 'Fecha de inicio de vigencia', |
||
25 | 'Fecha de fin de vigencia', |
||
26 | ]; |
||
27 | 3 | $headers = $csv->readLine(); |
|
28 | |||
29 | 3 | if ($expected !== $headers) { |
|
30 | 1 | throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); |
|
31 | } |
||
32 | 2 | $csv->next(); |
|
33 | } |
||
46 |