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

Bug #17202 handle tests being run straight from SVN; ie no post-install variable expansion
Submitted: 2010-03-08 20:06 UTC
From: doconnor Assigned: kguest
Status: Bogus Package: Date_Holidays (version SVN)
PHP Version: 5.3.1 OS:
Roadmaps: 0.21.5    
Subscription  


 [2010-03-08 20:06 UTC] doconnor (Daniel O'Connor)
Description: ------------ Unit tests expect Ostersonntag, but get Easter Sunday. Test script: --------------- php -c ../php.ini -f /home/clockwerx/packages-all/Date_Holidays/tests Expected result: ---------------- Tests pass Actual result: -------------- php -c ../php.ini -f /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php PHPUnit 3.4.10 by Sebastian Bergmann. ........................FF........................... Time: 3 seconds, Memory: 32.00Mb There were 2 failures: 1) Date_Holidays_Driver_Sweden_TestSuite::testGermanTranslations Translated title for 'easter' Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -Ostersonntag +Easter Sunday /home/clockwerx/packages-all/Date_Holidays/tests/Date_Holidays_Driver_Sweden_TestSuite.php:230 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:60 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:96 2) Date_Holidays_Driver_Sweden_TestSuite::testcompiledGermanTranslations Translated title for 'easter' Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -Ostersonntag +Easter Sunday /home/clockwerx/packages-all/Date_Holidays/tests/Date_Holidays_Driver_Sweden_TestSuite.php:256 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:60 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:96 FAILURES! Tests: 53, Assertions: 3368, Failures: 2.

Comments

 [2010-03-11 19:47 UTC] kguest (Ken Guest)
-Assigned To: +Assigned To: kguest
Dearest Daniel, I can't replicate this on a sane install :p I suspect the language files ("/Sweden/de_DE.xml" and "Sweden/de_DE.ser" in this instance) aren't being referenced/installed properly in your test set-up - the definition of the LANG_FILE constant is dependant on @DATA-DIR@ being expanded properly. So Daaarling, I need more information from you. Please divulge. Ken
 [2010-03-11 20:17 UTC] kguest (Ken Guest)
I've decided to skip whichever tests can't function properly due to unloadable translation files. Not an optimum solution though.
 [2010-03-12 05:13 UTC] doconnor (Daniel O'Connor)
It's just a straight checkout from svn; so @DATA-DIR@ isn't being done. Hmm :( Any chance of: $paths = array(dirname(__FILE__) . '/path/to/data/in/svn', "@DATA-DIR@"); foreach ($paths as $path) { if (is_dir($path)) { $data_dir = $path; } } kinda thing?
 [2010-03-14 17:25 UTC] kguest (Ken Guest)
-Summary: DateHolidays vs easter +Summary: handle tests being run straight from SVN; ie no post-install variable expansion -Status: Assigned +Status: Closed
This bug has been fixed in SVN. 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. fixed with changes in subversion
 [2010-04-25 19:42 UTC] doconnor (Daniel O'Connor)
-Status: Closed +Status: Open
1) Date_Holidays_Driver_Sweden_TestSuite::testGermanTranslations Translated title for 'easter' Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -Ostersonntag +Easter Sunday /home/clockwerx/packages-all/Date_Holidays/tests/Date_Holidays_Driver_Sweden_TestSuite.php:230 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:60 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:96 2) Date_Holidays_Driver_Sweden_TestSuite::testcompiledGermanTranslations Translated title for 'easter' Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -Ostersonntag +Easter Sunday /home/clockwerx/packages-all/Date_Holidays/tests/Date_Holidays_Driver_Sweden_TestSuite.php:256 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:60 /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php:96 FAILURES! Tests: 53, Assertions: 3368, Failures: 2. Still happening on http://test.pear.php.net/unit-test-results/phpunit_results.txt
 [2010-06-19 00:20 UTC] kguest (Ken Guest)
-Status: Assigned +Status: Bogus
Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. Seems ok to me - based on http://test.pear.php.net/unit-test-results/phpunit_results.txt: Unit tests for 2010-06-18T21:08:27+02:00 <snip> php -c ../php.ini -f /home/clockwerx/packages-all/Date_Holidays/tests/AllTests.php PHPUnit 3.4.10 by Sebastian Bergmann. ........................SS........................... Time: 3 seconds, Memory: 32.00Mb OK, but incomplete or skipped tests! Tests: 53, Assertions: 3366, Skipped: 2.