Annotation of embedaddon/php/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
1.1.1.2 ! misho 2: SplFileObject::fgetcsv with alternative delimiter
1.1 misho 3: --FILE--
4: <?php
5: $fp = fopen('SplFileObject__fgetcsv.csv', 'w+');
6: fputcsv($fp, array(
7: 'field1',
8: 'field2',
9: 'field3',
10: 5
11: ), ',', '"');
12: fclose($fp);
13:
14: $fo = new SplFileObject('SplFileObject__fgetcsv.csv');
15: var_dump($fo->fgetcsv(',', 'invalid'));
16: ?>
17: --CLEAN--
18: <?php
19: unlink('SplFileObject__fgetcsv.csv');
20: ?>
21: --EXPECTF--
22: Warning: SplFileObject::fgetcsv(): enclosure must be a character in %s on line %d
23: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>