Annotation of embedaddon/php/ext/spl/tests/SplFileObject_fputcsv_variation13.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test fputcsv() : usage variations - with default enclosure & delimiter of two chars 
                      3: --FILE--
                      4: <?php
                      5: 
                      6: /* Testing fputcsv() to write to a file when default enclosure value and delimiter
                      7:    of two chars is provided */
                      8: 
                      9: echo "*** Testing fputcsv() : with default enclosure & delimiter of two chars ***\n";
                     10: 
                     11: $fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv.csv', 'w');
                     12: 
                     13: var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '"'));
                     14: 
                     15: unset($fo);
                     16: 
                     17: echo "Done\n";
                     18: ?>
                     19: --CLEAN--
                     20: <?php
                     21: $file = __DIR__ . '/SplFileObject_fputcsv.csv';
                     22: unlink($file);
                     23: ?>
                     24: --EXPECTF--
                     25: *** Testing fputcsv() : with default enclosure & delimiter of two chars ***
                     26: 
                     27: Warning: SplFileObject::fputcsv(): delimiter must be a character in %s on line %d
                     28: bool(false)
                     29: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>