コード例 #1
0
ファイル: TableHelper.php プロジェクト: Danack/Console
 public function setHeaders(array $headers)
 {
     $this->table->setHeaders($headers);
     return $this;
 }
コード例 #2
0
ファイル: TableTest.php プロジェクト: Danack/Console
    public function testRowSeparator()
    {
        $table = new Table($output = $this->getOutputStream());
        $table->setHeaders(array('Foo'))->setRows(array(array('Bar1'), new TableSeparator(), array('Bar2'), new TableSeparator(), array('Bar3')));
        $table->render();
        $expected = <<<TABLE
+------+
| Foo  |
+------+
| Bar1 |
+------+
| Bar2 |
+------+
| Bar3 |
+------+

TABLE;
        $this->assertEquals($expected, $this->getOutputContent($output));
    }