Mercurial > hg > isophonics-drupal-site
annotate vendor/pear/console_table/tests/border-custom.phpt @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 --TEST-- |
Chris@0 | 2 Border: new custom mode |
Chris@0 | 3 --FILE-- |
Chris@0 | 4 <?php |
Chris@0 | 5 error_reporting(E_ALL | E_NOTICE); |
Chris@0 | 6 if (file_exists(dirname(__FILE__) . '/../Table.php')) { |
Chris@0 | 7 require_once dirname(__FILE__) . '/../Table.php'; |
Chris@0 | 8 } else { |
Chris@0 | 9 require_once 'Console/Table.php'; |
Chris@0 | 10 } |
Chris@0 | 11 $table = new Console_Table( |
Chris@0 | 12 CONSOLE_TABLE_ALIGN_LEFT, |
Chris@0 | 13 array('horizontal' => '=', 'vertical' => ':', 'intersection' => '*') |
Chris@0 | 14 ); |
Chris@0 | 15 $table->setHeaders(array('City', 'Mayor')); |
Chris@0 | 16 $table->addRow(array('Leipzig', 'Major Tom')); |
Chris@0 | 17 $table->addRow(array('New York', 'Towerhouse')); |
Chris@0 | 18 |
Chris@0 | 19 echo $table->getTable(); |
Chris@0 | 20 ?> |
Chris@0 | 21 --EXPECT-- |
Chris@0 | 22 *==========*============* |
Chris@0 | 23 : City : Mayor : |
Chris@0 | 24 *==========*============* |
Chris@0 | 25 : Leipzig : Major Tom : |
Chris@0 | 26 : New York : Towerhouse : |
Chris@0 | 27 *==========*============* |