Fixes #16331: Fixed console table without headers

This commit is contained in:
rhertogh
2018-10-26 12:00:49 +02:00
committed by Alexander Makarov
parent c86f26c0a8
commit 2ef24d9c65
3 changed files with 46 additions and 14 deletions

View File

@ -249,4 +249,24 @@ EXPECTED;
])->setScreenWidth(200)->run()
);
}
public function testEmptyHeaders()
{
$table = new Table();
$expected = <<<'EXPECTED'
╔═══════════════╤═══════════════╗
║ testcontent1 │ testcontent2 ║
╟───────────────┼───────────────╢
║ testcontent21 │ testcontent22 ║
╚═══════════════╧═══════════════╝
EXPECTED;
$this->assertEqualsWithoutLE($expected, $table->setRows([
['testcontent1', 'testcontent2'],
['testcontent21', 'testcontent22']
])->setScreenWidth(200)->run()
);
}
}