summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/htmlent.phpt
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2002-10-21 19:19:05 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2002-10-21 19:19:05 +0000
commitbce3d0cf7d7ae42bb9da887e8a946b92e6266702 (patch)
tree137fdcfa1c1a58929b8aa5803ff3481722fdeab7 /ext/mbstring/tests/htmlent.phpt
parent07b90cafc937462173c7ccc4a809349ec1f89940 (diff)
downloadphp-git-bce3d0cf7d7ae42bb9da887e8a946b92e6266702.tar.gz
Renamed the test cases.
Diffstat (limited to 'ext/mbstring/tests/htmlent.phpt')
-rw-r--r--ext/mbstring/tests/htmlent.phpt35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/mbstring/tests/htmlent.phpt b/ext/mbstring/tests/htmlent.phpt
new file mode 100644
index 0000000000..f4f2385a9c
--- /dev/null
+++ b/ext/mbstring/tests/htmlent.phpt
@@ -0,0 +1,35 @@
+--TEST--
+HTML input/output
+--SKIPIF--
+<?php
+ ini_set('include_path','.');
+ include('skipif.inc');
+?>
+--INI--
+output_handler = mb_output_handler
+zlib.output_compression = Off
+arg_separator.input="x"
+error_reporting=0
+mbstring.http_input=HTML-ENTITIES
+mbstring.internal_encoding=UTF8
+mbstring.http_output=HTML-ENTITIES
+mbstring.encoding_translation=On
+--FILE--
+<?php
+// enable output encoding through output handler
+ob_start("mb_output_handler");
+// &#64... are must be decoded on input these are not reencoded on output.
+// If you see &#64;&#65;&#66; on output this means input encoding fails.
+// If you do not see &auml;... on output this means output encoding fails.
+// Using UTF-8 internally allows to encode/decode ALL characters.
+// &128... will stay as they are since their character codes are above 127
+// and they do not have a named entity representaion.
+?>
+<?php echo mb_http_input('l').'>'.mb_internal_encoding().'>'.mb_http_output();?>
+
+<?php mb_parse_str("test=&&;&&#64;&#65;&#66;&#128;&#129;&#130;&auml;&ouml;&uuml;&euro;&lang;&rang;");
+echo "test='$test'";
+?>
+--EXPECT--
+HTML-ENTITIES>UTF-8>HTML-ENTITIES
+test='&&;&@AB&#128;&#129;&#130;&auml;&ouml;&uuml;&euro;&lang;&rang;' \ No newline at end of file