| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 59 | public function testReset() |
||
| 60 | { |
||
| 61 | $content = <<<CSV |
||
| 62 | id,name |
||
| 63 | 1,John |
||
| 64 | 2,Peter |
||
| 65 | CSV; |
||
| 66 | vfsStream::newFile('test.csv')->setContent($content)->at($this->root); |
||
| 67 | $csv = new Csv(vfsStream::url('root/test.csv')); |
||
| 68 | $this->assertSame([ |
||
| 69 | 'id' => '1', |
||
| 70 | 'name' => 'John', |
||
| 71 | ], $csv->get()); |
||
| 72 | $csv->reset(); |
||
| 73 | $this->assertSame([ |
||
| 74 | 'id' => '1', |
||
| 75 | 'name' => 'John', |
||
| 76 | ], $csv->get()); |
||
| 77 | } |
||
| 78 | |||
| 102 |