Annotation of embedaddon/php/ext/spl/tests/SplFileObject_fputcsv_002.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SplFileObject::fputcsv(): Checking data after calling the function
! 3: --FILE--
! 4: <?php
! 5: $fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv.csv', 'w');
! 6:
! 7: $data = array(1, 2, 'foo', 'haha', array(4, 5, 6), 1.3, null);
! 8:
! 9: $fo->fputcsv($data);
! 10:
! 11: var_dump($data);
! 12: ?>
! 13: --CLEAN--
! 14: <?php
! 15: $file = __DIR__ . '/SplFileObject_fputcsv.csv';
! 16: unlink($file);
! 17: ?>
! 18: --EXPECTF--
! 19: Notice: Array to string conversion in %s on line %d
! 20: array(7) {
! 21: [0]=>
! 22: int(1)
! 23: [1]=>
! 24: int(2)
! 25: [2]=>
! 26: string(3) "foo"
! 27: [3]=>
! 28: string(4) "haha"
! 29: [4]=>
! 30: array(3) {
! 31: [0]=>
! 32: int(4)
! 33: [1]=>
! 34: int(5)
! 35: [2]=>
! 36: int(6)
! 37: }
! 38: [5]=>
! 39: float(1.3)
! 40: [6]=>
! 41: NULL
! 42: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>