Drupal investigation

bug20181.phpt 522B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #20181: setAlign() on non-zero column
  3. --FILE--
  4. <?php
  5. error_reporting(E_ALL | E_NOTICE);
  6. if (file_exists(dirname(__FILE__) . '/../Table.php')) {
  7. require_once dirname(__FILE__) . '/../Table.php';
  8. } else {
  9. require_once 'Console/Table.php';
  10. }
  11. $table = new Console_Table();
  12. $table->setAlign(1, CONSOLE_TABLE_ALIGN_RIGHT);
  13. $table->setHeaders(array('f', 'bar'));
  14. $table->addRow(array('baz', 'b'));
  15. echo $table->getTable();
  16. ?>
  17. --EXPECT--
  18. +-----+-----+
  19. | f | bar |
  20. +-----+-----+
  21. | baz | b |
  22. +-----+-----+