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

Bug #6903 9 PEAR_Command_Remote tests fail (update protocols)
Submitted: 2006-02-23 12:30 UTC
From: toggg Assigned: cellog
Status: Closed Package: PEAR (version CVS)
PHP Version: Irrelevant OS: fc3
Roadmaps: (Not assigned)    
Subscription  


 [2006-02-23 12:30 UTC] toggg (bertrand Gugger)
Description: ------------ 9 FAILED TESTS: tests/PEAR_Command_Remote/search/test.phpt tests/PEAR_Command_Remote/remote-list/test.phpt tests/PEAR_Command_Remote/remote-info/test.phpt tests/PEAR_Command_Remote/remote-info/test_installed.phpt tests/PEAR_Command_Remote/remote-info/test_rest.phpt tests/PEAR_Command_Remote/list-upgrades/test.phpt tests/PEAR_Command_Remote/list-all/test.phpt tests/PEAR_Command_Remote/list-all/test_rest.phpt tests/PEAR_Command_Remote/list-all/test_rest_fail.phpt They all fail because they output a 'info' => 'WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update' Checking further, it appears the standard PEAR_Command_Remote::_checkChannelForStatus() is called, making an actual HTTP request which naturally chokes with the test fake config. A work around is to overwrite this method in the test_PEAR_Command_Remote extends PEAR_Command_Remote in tests/PEAR_Command_Remote/setup.php.inc, but I'm not sure it was intended this way. That's the only way I found: to do nothing and return in this overwritten method. I tried yo keep it and call the mock pearweb instead but then it went to loop thru the $GLOBALS['pearweb']->receiveREST($url) in the test_PEAR_REST::downloadHttp(). Test script: --------------- --- setup.php.incsav 2006-02-23 08:34:44.000000000 +0100 +++ setup.php.inc 2006-02-23 12:40:55.000000000 +0100 @@ -80,6 +80,10 @@ require_once 'PEAR/Command/Remote.php'; class test_PEAR_Command_Remote extends PEAR_Command_Remote { + function _checkChannelForStatus($channel, $chan) + { + return; + } function &getDownloader($options) { $a = &new test_PEAR_Downloader($this->ui, $options, $this->config);

Comments

 [2006-03-23 04:21 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net 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.