Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function getHeaders() |
||
19 | { |
||
20 | $fileObject = new SplFileObject(__DIR__ . '/_files/pipe_delimited.txt'); |
||
21 | $fileObject->setFlags(SplFileObject::READ_CSV); |
||
22 | $fileObject->setCsvControl('|'); |
||
23 | $strategy = new DeriveHeaderStrategy(); |
||
24 | $this->assertSame( |
||
25 | ['id', 'author', 'title', 'genre', 'price', 'publish_date', 'description'], |
||
26 | $strategy->getHeaders($fileObject) |
||
27 | ); |
||
28 | } |
||
29 | } |
||
30 |