Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function testFailedWrite() |
||
44 | { |
||
45 | $root = vfsStream::setup(); |
||
46 | $header = [ |
||
47 | 'firstname', |
||
48 | 'lastname', |
||
49 | ]; |
||
50 | // create file |
||
51 | $url = $root->url() . '/users.csv'; |
||
52 | $h = fopen($url, 'w'); |
||
53 | fclose($h); |
||
54 | |||
55 | $file = new \SplFileObject($url, 'r'); |
||
56 | $csv = new Csv('testId', $file, $header); |
||
57 | $bag = new SimpleBag([ |
||
58 | 'firstname' => 'Bob', |
||
59 | 'lastname' => 'Dawson', |
||
60 | ]); |
||
61 | $csv->pass($bag); |
||
62 | } |
||
63 | } |
||
64 |