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

Request #15745 Global state vs test expectations (Packager tests)
Submitted: 2009-01-24 01:41 UTC
From: doconnor Assigned:
Status: Open Package: PEAR (version CVS)
PHP Version: 5.2.6 OS: Ubuntu 8.10
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 19 + 39 = ?

 
 [2009-01-24 01:41 UTC] doconnor (Daniel O'Connor)
Description: ------------ Packager unit tests fail for me - they produce the correct output; but also generate warnings. This is because the user I'm running under doesn't have permission to write to the appropriate tmp folder, and remove certain folders. The unit tests should be using the dummy configuration provided (tests/PEAR_Packager/setup.inc.php does this); but don't appear to be. Workarounds: * Run the unit tests via sudo * Change my pear configuration (pear config-set temp_dir 123) A good way to fix this long term would be to shift the PEAR Config fetching to the very start of the application, and pass it through to the appropriate layers, rather than a static method / singleton. $pear->setConfig(new PEAR_Config()); Test script: --------------- # Grab from CVS cvs update -d && sudo pear install -f package2.xml pear config-set temp_dir /some/path/you/dont/have/write/access/to cd tests/ pear run-tests PEAR_Packager/test_warning.phpt Expected result: ---------------- tests done Actual result: -------------- tests done Warning: Could not open dir /tmp/hsperfdata_tomcat6 in /usr/share/php/System.php on line 99 Warning: Could not open dir /tmp/orbit-root in /usr/share/php/System.php on line 99 Warning: Could not open dir /tmp/hsperfdata_tomcat6 in /usr/share/php/System.php on line 99 Warning: Could not open dir /tmp/orbit-root in /usr/share/php/System.php on line 99

Comments

 [2009-04-04 05:13 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Type: Bug +Type: Feature/Change Request