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

Bug #14818 Unit test failures in CVS
Submitted: 2008-10-17 22:38 UTC Modified: 2008-11-30 09:21 UTC
From: doconnor Assigned: mj
Status: Closed Package: File_DeliciousLibrary (version CVS)
PHP Version: 5.2.6 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-10-17 22:38 UTC] doconnor (Daniel O'Connor)
Description: ------------ There's a number of unhandled exceptions and one direct failure when running the unit tests from CVS. Expected result: ---------------- Tests pass Actual result: -------------- There were 7 errors: 1) testOnlyBooks(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:94 2) testOnlyMovies(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:112 3) testOnlyMusic(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:130 4) testOnlyGames(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:148 5) testShelves(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:166 6) testCoverLocations(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:178 7) testShelfContains(File_DeliciousLibraryTest) File_DeliciousLibrary_Exception: Input file File/DeliciousLibrary/library.xml is not readable /usr/share/php/File/DeliciousLibrary.php:142 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:191 -- There was 1 failure: 1) testNonWellformedXML(File_DeliciousLibraryTest) Failed asserting that two strings are equal. expected string <Unable to parse input file File/DeliciousLibrary/not-wellformed.xml> difference <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> got string <Input file File/DeliciousLibrary/not-wellformed.xml is not readable> /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:85 FAILURES! Tests: 9, Assertions: 4, Failures: 1, Errors: 7.

Comments

 [2008-10-17 22:38 UTC] doconnor (Daniel O'Connor)
(the tests should probably check that certain files are readable & markTestSkipped() if they are not)
 [2008-10-18 02:01 UTC] doconnor (Daniel O'Connor)
Ah, the reliance on the current working directory being the test one breaks when you run as: phpunit tests/
 [2008-10-18 02:05 UTC] doconnor (Daniel O'Connor)
Attached patch is much more explicit about where to look for test data, and makes use of setUp() It still has: There was 1 error: 1) testShelfContains(File_DeliciousLibraryTest) Undefined index: 702F75C0-7C6C-4537-8993-8ACA086F09C0 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:191 /home/clockwerx/pear/File_DeliciousLibrary/tests/File/DeliciousLibrary/DeliciousLibraryTest.php:191
 [2008-11-30 09:21 UTC] mj (Martin Jansen)
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.