public static asciiBorder ( ) : |
||
Результат | The style. |
public static function asciiBorder()
{
if (!self::$asciiBorder) {
self::$asciiBorder = new static();
self::$asciiBorder->cellFormat = ' %s ';
self::$asciiBorder->borderStyle = BorderStyle::ascii();
}
return clone self::$asciiBorder;
}
public function testRenderAllCellsInOneLine() { $grid = new Grid(GridStyle::asciiBorder()); $grid->addCells(array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri')); $grid->render($this->io); $expected = <<<'EOF' +---------------+---------------+-----------------+ | 99921-58-10-7 | Divine Comedy | Dante Alighieri | +---------------+---------------+-----------------+ EOF; $this->assertSame($expected, $this->io->fetchOutput()); }