File: bug20181.phpt

package info (click to toggle)
php-console-table 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 212 kB
  • sloc: php: 498; xml: 414; sh: 5; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #20181: setAlign() on non-zero column
--FILE--
<?php
error_reporting(E_ALL | E_NOTICE);
if (file_exists(dirname(__FILE__) . '/../Table.php')) {
    require_once dirname(__FILE__) . '/../Table.php';
} else {
    require_once 'Console/Table.php';
}
$table = new Console_Table();
$table->setAlign(1, CONSOLE_TABLE_ALIGN_RIGHT);
$table->setHeaders(array('f', 'bar'));
$table->addRow(array('baz', 'b'));

echo $table->getTable();
?>
--EXPECT--
+-----+-----+
| f   | bar |
+-----+-----+
| baz |   b |
+-----+-----+