Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Request #14822 Make use of SKIPIF when xmlrpc extension not loaded (unit tests)
Submitted: 2008-10-18 13:00 UTC
From: doconnor Assigned: doconnor
Status: Closed Package: XML_RPC2 (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    

 [2008-10-18 13:00 UTC] doconnor (Daniel O'Connor)
Description: ------------ Take a look at the DB package's unit tests. They make use of --SKIPIF-- --TEST-- DB::parseDSN --SKIPIF-- <?php chdir(dirname(__FILE__)); require_once ''; ?> --FILE-- Basically, if you produce output here, the test does not run. Test script: --------------- Run tests without xmlrpc extension Expected result: ---------------- Test skips because xmlrpc is not available Actual result: -------------- From 343) /pear/XML_RPC2/tests/XML_RPC2/xmlrpcextBackend/server/validator1SimpleStructReturnTest.phpt --- Expected +++ Actual @@ -1,8 +1,6 @@ -array(3) { - ["times10"]=> - int(130) - ["times100"]=> - int(1300) - ["times1000"]=> - int(13000) -} \ No newline at end of file +Fatal error: Uncaught exception 'XML_RPC2_Exception' with message 'Unable to load xmlrpc extension.' in /pear/XML_RPC2/XML/RPC2/Backend.php:114 +Stack trace: +#0 /pear/XML_RPC2/XML/RPC2/Server.php(193): XML_RPC2_Backend::setBackend('Xmlrpcext') +#1 /pear/XML_RPC2/tests/XML_RPC2/xmlrpcextBackend/server/validator1SimpleStructReturnTest.php(27): XML_RPC2_Server::create('TestServer', Array) +#2 {main} + thrown in /pear/XML_RPC2/XML/RPC2/Backend.php on line 114 \ No newline at end of file


 [2008-10-18 13:10 UTC] doconnor (Daniel O'Connor)
To say it more concisely: if I don't have the xmlrpc extension, dont run the tests
 [2008-10-26 02:08 UTC] doconnor (Daniel O'Connor)
Here's a patch for curl related tests that should skip:
 [2008-10-26 08:16 UTC] doconnor (Daniel O'Connor)
Just added another patch to skip more to the file, as well as the pastebin'd one.
 [2008-10-27 13:33 UTC] doconnor (Daniel O'Connor)
Alright, so the curl and xmlrpc ones have been committed in CVS; but validator1EasyStructTest.phpt still fails - it's a phpBackend test but tries to load the xmlrpc extension.
 [2008-10-27 14:19 UTC] doconnor (Daniel O'Connor)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Spun off issue xmlrpc extension failure to Bug #14896 Everything else is now happy in CVS