mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #16331: Fixed console table without headers
This commit is contained in:

committed by
Alexander Makarov

parent
c86f26c0a8
commit
2ef24d9c65
@ -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()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user