public function TableTest::testRowSeparator in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Helper/TableTest.php \Symfony\Component\Console\Tests\Helper\TableTest::testRowSeparator()
File
- vendor/
symfony/ console/ Tests/ Helper/ TableTest.php, line 524
Class
Namespace
Symfony\Component\Console\Tests\HelperCode
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));
$this
->assertEquals($table, $table
->addRow(new TableSeparator()), 'fluent interface on addRow() with a single TableSeparator() works');
}