0ac7723e200f1e0a5ebb1b0e73db69ddf1806625
[yaffs-website] / vendor / pear / console_table / tests / multibyte.phpt
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 +----------------+