diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index 23e68c4c6d4f..476c08d1e31b 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -945,7 +945,7 @@ public static function table(array $tbody, array $thead = []) } } - fwrite(STDOUT, $table); + static::write($table); } //-------------------------------------------------------------------- diff --git a/tests/system/CLI/CLITest.php b/tests/system/CLI/CLITest.php index 321fc0dc574c..62bd6c62f48c 100644 --- a/tests/system/CLI/CLITest.php +++ b/tests/system/CLI/CLITest.php @@ -367,7 +367,7 @@ public function tableProvider() [], "+---+-----+\n" . "| 1 | bar |\n" . - "+---+-----+\n", + "+---+-----+\n\n", ], [ $one_row, @@ -376,7 +376,7 @@ public function tableProvider() "| ID | Title |\n" . "+----+-------+\n" . "| 1 | bar |\n" . - "+----+-------+\n", + "+----+-------+\n\n", ], [ $many_rows, @@ -385,7 +385,7 @@ public function tableProvider() "| 1 | bar |\n" . "| 2 | bar * 2 |\n" . "| 3 | bar + bar + bar |\n" . - "+---+-----------------+\n", + "+---+-----------------+\n\n", ], [ $many_rows, @@ -396,7 +396,7 @@ public function tableProvider() "| 1 | bar |\n" . "| 2 | bar * 2 |\n" . "| 3 | bar + bar + bar |\n" . - "+----+-----------------+\n", + "+----+-----------------+\n\n", ], ]; }