Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
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 | 3 | 'Clave identificación', |
|
22 | 3 | 'Nacionalidad', |
|
23 | 3 | 'Nombre de la aerolínea', |
|
24 | 3 | 'Designador OACI', |
|
25 | 3 | 'Fecha de inicio de vigencia', |
|
26 | 3 | 'Fecha de fin de vigencia', |
|
27 | 3 | ]; |
|
28 | 3 | $headers = $csv->readLine(); |
|
29 | |||
30 | 3 | if ($expected !== $headers) { |
|
31 | 1 | throw new RuntimeException("The headers did not match on file {$this->sourceFile()}"); |
|
32 | } |
||
33 | |||
34 | 2 | $csv->next(); |
|
35 | } |
||
49 |