Sonata\Exporter\Test\Writer\CsvWriterTest::testEnclosureFormating PHP Method

testEnclosureFormating() public method

    public function testEnclosureFormating()
    {
        $writer = new CsvWriter($this->filename, ',', '"', '\\', false);
        $writer->open();
        $writer->write(array(' john , ""2"', 'doe', '1'));
        $writer->close();
        $expected = '" john , """"2""",doe,1';
        $this->assertEquals($expected, trim(file_get_contents($this->filename)));
    }