? ? Success

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
29 Nov 2013

Same as #2616 but for staging

There are several tests which fail on windows due to cross platform issues (line endings and directory separators).
Here's the tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32842&start=0

In case of line endings, where appropriate, I've changed the test to use \n instead of PHP_EOL.
In case of directory separators, JPath::clean() will have already changed everything to DIRECTORY_SEPARATOR by the time the test runs so, I've changed the test to also use that instead of /.
In a case where we are just testing an xml string, I've changed the test itself to assertXmlStringEqualsXmlString so that line ending issues are not even considered at all.

There are still some tests failing in JViewLegacyTest but, in my opinion, these are actually problems with JViewLegacy and not the test. Basically, it should be calling JPath::clean() on directory strings but it isn't. So I will include those fixes in a different PR.

avatar okonomiyaki3000 okonomiyaki3000 - open - 29 Nov 2013
avatar wilsonge
wilsonge - comment - 9 Dec 2013

Looks good to me - although I'm confused as to why \n is a better alternative to PHP_EOL which by definition should be cross platform compatible :confused:

avatar mbabker
mbabker - comment - 9 Dec 2013

If we've got a hardcoded \n then the test should be checking for \n not PHP_EOL.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 9 Dec 2013

Indeed. And \n is what you want in these cases anyway. And also in all cases everywhere forever. Why should we send different line endings based on what OS the server is running?

avatar okonomiyaki3000 okonomiyaki3000 - change - 11 Dec 2013
Labels Added: ? ? ?
avatar okonomiyaki3000
okonomiyaki3000 - comment - 11 Dec 2013

So I decided to do that JViewLegacy fix after all. Now all tests should run properly on windows or any system.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 28 Jan 2014

I found another case of PHP_EOL in the tests but \n in the library. I don't know if there is ever a case for using PHP_EOL, seems like just a bad idea.

avatar Bakual
Bakual - comment - 28 Jan 2014

Since we require that files use unix line endings, I guess PHP_EOL doesn't make much sense.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 18 Apr 2014

Yeah so, without this patch, the tests fail. How can anyone contribute code to this project if all code is required to pass the tests and the tests already don't pass?

avatar roland-d
roland-d - comment - 6 May 2014

I am having problems running the unit tests, posted it in the JC Tracker.

avatar okonomiyaki3000 okonomiyaki3000 - change - 8 May 2014
Title
fix tests
[#32842] fix tests
avatar Hackwar
Hackwar - comment - 11 Jul 2014

test: works. This fixes 4 tests on my windows machine. In my opinion, this can be merged.

avatar Bakual Bakual - change - 11 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-11 12:40:43
avatar Bakual Bakual - close - 11 Jul 2014

Add a Comment

Login with GitHub to post a comment