Drupal investigation

border-ascii.phpt 663B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Border: default ASCII mode
  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(CONSOLE_TABLE_ALIGN_LEFT, CONSOLE_TABLE_BORDER_ASCII);
  12. $table->setHeaders(array('City', 'Mayor'));
  13. $table->addRow(array('Leipzig', 'Major Tom'));
  14. $table->addRow(array('New York', 'Towerhouse'));
  15. echo $table->getTable();
  16. ?>
  17. --EXPECT--
  18. +----------+------------+
  19. | City | Mayor |
  20. +----------+------------+
  21. | Leipzig | Major Tom |
  22. | New York | Towerhouse |
  23. +----------+------------+