/** * @dataProvider testRenderProvider */ public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected) { $table = new Table($output = $this->getOutputStream()); $table->setHeaders($headers)->setStyle($style); foreach ($rows as $row) { $table->addRow($row); } $table->render(); $this->assertEquals($expected, $this->getOutputContent($output)); }
public function addRow(array $row) { $this->table->addRow($row); return $this; }