Forget about my last comment. It checks the clients' os and probably isn't even safe. I am looking for something like $_SERVER['WINDIR'] to evaluate. Do not know if it is set on linux usually. I would expect not. Anyone?

Because my last commit was premature, I will be more carefull now. I will attach two patches to this issue, one holds the testfunction and the other the actual patch to Http.php

Posted by Ben Scholzen (dasprid) on 2008-11-06T13:12:13.000+0000

For OS-identification, use the constant PHP_OS, See first unit test of Zend_ProgressBar_Adapter_Console to see how it works.

Another thing is, that you should really read the coding standard definitions in the manual first and correct your code according to this. Also please correct the comment you inserted there, and add the issue number to which the fix refers to.

As for the thing with the backslashes in directory names: I just tested it on windows, and creating directories with a backslash in the name IS possible, tho not directly through the windows API. Check back with Matthew if you need to do any additional changes in the main code logic.

If that is done, re-add the new patches and I will validate them for you again.

testGetBasePathsEmptyStringIFNoneSet() is a windows-only test, so should be skipped on other systems. As for the backslash thing: It is kinda unusual and hacky, that one exists in windows enviroments, so you are should just replace all backslashes with slashes (sorry for that disinformation). So you can also remove the second test again.

As for the coding standard, please insert one blank line before your if-block, and for the docblocks in the tests:
There is no @group or @descr doc tags, write the description without @descr and for the issue number use @see.

As for skipping the test, I am not sure. The test should be valid on all other systems too, if it is not, there is something terribly wrong. But if you insist on skipping, do you have a tip regarding phpunit and how to skip on the PHP_OS check?

I am glad my second test convinced you about the backslashes so that all backslashes may be replaced.

@group is in the contributors guide and also in some tests written by others, so either is wrong: you or the wiki. Please find out who is right.

I will remove @descr and add the blank line before if (had not come to that section yet with my reading of the coding standards)

Posted by Ben Scholzen (dasprid) on 2008-11-07T06:43:28.000+0000

Hm well yeah you are probably right about that the test should success on all systems, so well, let it this way. If you are however interested on how to skip on certain OS, see the first test case of Zend_ProgressBar_Adapter_Console again.

About the @group thingy: well, If it is also in other tests then well, I won't complain about it. Yet there's not real standard about the tests anyway, so who cares ..

On second thought, I think it was in the mailinglist where I first saw the @group and in an existing test. But I have replaced it with @see, because I am running out of time and I will just have to trust you in this :).