예제 #1
0
 public function setHeaders(array $headers)
 {
     $this->table->setHeaders($headers);
     return $this;
 }
예제 #2
0
    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));
    }