| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 3 | public function checkHeaders(CsvFile $csv): void |
|
| 18 | { |
||
| 19 | 3 | $csv->move(3); |
|
| 20 | 3 | $expected = [ |
|
| 21 | 3 | 'Clave', |
|
| 22 | 3 | 'Tipo de contenedor', |
|
| 23 | 3 | 'Descripción', |
|
| 24 | 3 | 'Fecha de inicio de vigencia', |
|
| 25 | 3 | 'Fecha de fin de vigencia', |
|
| 26 | 3 | ]; |
|
| 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 |