cvs: pear-core /tests/PEAR_Common test_infoFromString_invalidxml.phpt
| From: | Helgi �ormar �orbj�rnsson | Date: | Mon, 09 Mar 2009 00:29:16 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Common test_infoFromString_invalidxml.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-8255@lists.php.net to get a copy of this message | ||
dufuz Mon Mar 9 00:29:16 2009 UTC
Modified files:
/pear-core/tests/PEAR_Common test_infoFromString_invalidxml.phpt
Log:
Account for a xml_error_string() offset by one bug fix Scott did in PHP 5.2.9 and up
http://cvs.php.net/viewvc.cgi/pear-core/tests/PEAR_Common/test_infoFromString_invalidxml.phpt?r1=1.7&r2=1.8&diff_format=u
Index: pear-core/tests/PEAR_Common/test_infoFromString_invalidxml.phpt
diff -u pear-core/tests/PEAR_Common/test_infoFromString_invalidxml.phpt:1.7
pear-core/tests/PEAR_Common/test_infoFromString_invalidxml.phpt:1.8
--- pear-core/tests/PEAR_Common/test_infoFromString_invalidxml.phpt:1.7 Fri Dec 26 06:13:59 2008
+++ pear-core/tests/PEAR_Common/test_infoFromString_invalidxml.phpt Mon Mar 9 00:29:16 2009
@@ -13,10 +13,11 @@
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
-$php5 = version_compare(phpversion(), '5.0.0', '>=');
+// 5.2.9 and up has the proper error msg again
+$php5 = (version_compare(phpversion(), '5.0.0', '>=') &&
version_compare(phpversion(), '5.2.8', '<='));
+$message = $php5 ? 'XML error: Empty document at line 1' : 'XML error: Not
well-formed (invalid token) at line 1';
+
$ret = $common->infoFromString('\\goober');
-$message = $php5 ? 'XML error: Empty document at line 1' :
- 'XML error: not well-formed (invalid token) at line 1';
$phpunit->assertErrors(array(
array('package' => 'PEAR_Error', 'message' => $message),
array('package' => 'PEAR_PackageFile', 'message' =>
'package.xml "" has no package.xml <package> version')), 'error
message');