1--TEST--
2Test fputcsv() : usage variations - with 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 and file is opened in read only mode */
8
9echo "*** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode ***\n";
10
11$fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv_variation14.csv', 'w');
12
13try {
14    var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '""'));
15} catch (ValueError $e) {
16    echo $e->getMessage(), "\n";
17}
18
19unset($fo);
20
21echo "Done\n";
22?>
23--CLEAN--
24<?php
25$file = __DIR__ . '/SplFileObject_fputcsv_variation14.csv';
26unlink($file);
27?>
28--EXPECT--
29*** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode ***
30SplFileObject::fputcsv(): Argument #3 ($enclosure) must be a single character
31Done
32