cvs: pear-core /tests/PEAR_Downloader_Package test_initialize_invalidpackagexml.phpt

From: Date: Mon, 09 Mar 2009 00:29:15 +0000
Subject: cvs: pear-core /tests/PEAR_Downloader_Package test_initialize_invalidpackagexml.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-8254@lists.php.net to get a copy of this message
dufuz Mon Mar 9 00:29:15 2009 UTC Modified files: /pear-core/tests/PEAR_Downloader_Package test_initialize_invalidpackagexml.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_Downloader_Package/test_initialize_invalidpackagexml.phpt?r1=1.10&r2=1.11&diff_format=u Index: pear-core/tests/PEAR_Downloader_Package/test_initialize_invalidpackagexml.phpt diff -u pear-core/tests/PEAR_Downloader_Package/test_initialize_invalidpackagexml.phpt:1.10 pear-core/tests/PEAR_Downloader_Package/test_initialize_invalidpackagexml.phpt:1.11 --- pear-core/tests/PEAR_Downloader_Package/test_initialize_invalidpackagexml.phpt:1.10 Tue Feb 17 00:18:41 2009 +++ pear-core/tests/PEAR_Downloader_Package/test_initialize_invalidpackagexml.phpt Mon Mar 9 00:29:14 2009 @@ -13,9 +13,10 @@ 'test_initialize_invalidpackagexml'. DIRECTORY_SEPARATOR . 'invalid.xml'; $dp = &newDownloaderPackage(array()); $phpunit->assertNoErrors('after create'); -$message = version_compare(phpversion(), '5.0.0', '<') ? - 'XML error: not well-formed (invalid token) at line 1' : - 'XML error: Empty document at line 1'; + +// 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'; $result = $dp->initialize($pathtopackagexml); $phpunit->assertErrors(

« previous php.pear.core (#8254) next »