asciiBorder() public static method

A style that uses ASCII characters for drawing borders.
public static asciiBorder ( ) : GridStyle
return GridStyle The style.
コード例 #1
0
ファイル: GridTest.php プロジェクト: webmozart/console
    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());
    }