public function testToCharset()
 {
     $config = new ExporterConfig();
     $this->assertSame(null, $config->getToCharset());
     $this->assertSame('UTF-8', $config->setToCharset('UTF-8')->getToCharset());
 }
Beispiel #2
0
 public function test_encoding()
 {
     $csv = 'vfs://output/euc.csv';
     $this->assertFileNotExists($csv);
     $config = new ExporterConfig();
     $config->setToCharset('EUC-JP');
     $config->setNewline("\n");
     $exporter = new Exporter($config);
     $exporter->export($csv, array(array('あ', 'い', 'う', 'え', 'お')));
     $this->assertFileEquals(__DIR__ . '/csv_files/euc-jp.csv', $csv);
 }