public function testStyle() { $style = new TableStyle(); $style->setHorizontalBorderChar('.')->setVerticalBorderChar('.')->setCrossingChar('.'); Table::setStyleDefinition('dotfull', $style); $table = new Table($output = $this->getOutputStream()); $table->setHeaders(array('Foo'))->setRows(array(array('Bar')))->setStyle('dotfull'); $table->render(); $expected = <<<TABLE ....... . Foo . ....... . Bar . ....... TABLE; $this->assertEquals($expected, $this->getOutputContent($output)); }
private static function initStyles() { $borderless = new TableStyle(); $borderless->setHorizontalBorderChar('=')->setVerticalBorderChar(' ')->setCrossingChar(' '); $compact = new TableStyle(); $compact->setHorizontalBorderChar('')->setVerticalBorderChar(' ')->setCrossingChar('')->setCellRowContentFormat('%s'); return array('default' => new TableStyle(), 'borderless' => $borderless, 'compact' => $compact); }