public function testTsvAction() { $data = [['id' => '1', 'name' => 'ciao', 'a' => 'mondo'], ['id' => '2', 'name' => 'hello', 'a' => 'world']]; $writer = new TSV(); $writer->openURI('tsv.tsv'); echo $writer->beginOutput(); foreach ($data as $doc) { echo $writer->addDocument($doc); sleep(5); } echo $writer->endOutput(); }
/** * {@inheritdoc} */ public static function tearDownAfterClass() { if (static::$write) { self::$writer->endOutput(); } }