Ejemplo n.º 1
0
 /**
  * @dataProvider rows
  */
 public function testWriteRowAcceptsAnIteratorOrAnArray($row)
 {
     $file = vfsStream::url('home/simplewriter_writerow');
     $writer = new SimpleWriter($file, Dialect::csv());
     $writer->writeRow($row);
     $this->assertEquals("one,two\n", file_get_contents($file));
 }
Ejemplo n.º 2
0
 public static function dialects()
 {
     return [['dictreader.csv', Dialect::csv()], ['dictreader.tsv', Dialect::tsv()], ['dictreader.psv', Dialect::pipe()], ['dictreader.tilde', Dialect::tilde()]];
 }