Mercurial > hg > isophonics-drupal-site
comparison vendor/pear/console_table/tests/multibyte.phpt @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 --TEST-- | |
2 Multibyte strings | |
3 --FILE-- | |
4 <?php | |
5 | |
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 | |
12 $table = new Console_Table(); | |
13 $table->setHeaders(array('Schön', 'Häßlich')); | |
14 $table->addData(array(array('Ich', 'Du'), array('Ä', 'Ü'))); | |
15 echo $table->getTable(); | |
16 | |
17 $table = new Console_Table(); | |
18 $table->addRow(array("I'm from 中国")); | |
19 $table->addRow(array("我是中国人")); | |
20 $table->addRow(array("I'm from China")); | |
21 echo $table->getTable(); | |
22 | |
23 ?> | |
24 --EXPECT-- | |
25 +-------+---------+ | |
26 | Schön | Häßlich | | |
27 +-------+---------+ | |
28 | Ich | Du | | |
29 | Ä | Ü | | |
30 +-------+---------+ | |
31 +----------------+ | |
32 | I'm from 中国 | | |
33 | 我是中国人 | | |
34 | I'm from China | | |
35 +----------------+ |