cvs: pear /XML_Util/tests testBug_4950.phpt testBug_5392.phpt
[email protected] ("Chuck Burgess") Sun, 04 May 2008 18:34:58 -0000
| Newsgroups | php.pear.cvs |
|---|---|
| Message-ID | <cvsashnazg1209926098@cvsserver> |
ashnazg Sun May 4 18:34:58 2008 UTC
Added files:
/pear/XML_Util/tests testBug_4950.phpt testBug_5392.phpt
Log:
add test files for bugs #4950 and #5392
http://cvs.php.net/viewvc.cgi/pear/XML_Util/tests/testBug_4950.phpt?view=markup&rev=1.1
Index: pear/XML_Util/tests/testBug_4950.phpt
+++ pear/XML_Util/tests/testBug_4950.phpt
--TEST--
XML_Util tests for Bug #4950 "Incorrect CDATA serializing"
--FILE--
<?php
require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
echo "TEST: test case provided in bug report" . PHP_EOL;
echo XML_Util::createTag("test", array(), "Content ]]></test> here!",
null, XML_UTIL_CDATA_SECTION);
?>
--EXPECT--
TEST: test case provided in bug report
<test><![CDATA[Content ]]>]]><![CDATA[</test> here!]]></test>
http://cvs.php.net/viewvc.cgi/pear/XML_Util/tests/testBug_5392.phpt?view=markup&rev=1.1
Index: pear/XML_Util/tests/testBug_5392.phpt
+++ pear/XML_Util/tests/testBug_5392.phpt
--TEST--
XML_Util tests for Bug #5392 "encoding of ISO-8859-1 is the only supported encoding"
--FILE--
<?php
require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
echo "TEST: test case provided in bug report" . PHP_EOL;
$data = 'This data contains special chars like'
. ' <, >, & and " as well as ä, ö, ß, à and ê';
$util = XML_Util::replaceEntities($data) . PHP_EOL . PHP_EOL;
$utf8 = XML_Util::replaceEntities(utf8_encode($data)) . PHP_EOL . PHP_EOL;
echo $util;
echo $utf8;
if ($util == $utf8) {
echo "THEY ARE THE SAME.";
}
?>
--EXPECT--
TEST: test case provided in bug report
This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê
This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê
THEY ARE THE SAME.