Problem/Motivation

Since phpUnit testing is enabled in the simpletests module the testing is broken under windows.
This because the current integration of phpUnit works on unix plattforms only.

Proposed resolution

Implement an OS independent / specific solution to run phpUnit.
I wasn't able to come up with an OS independent solution thus the attached patch implements a Windows specific command to run phpUnit.

Remaining tasks

reviews needed

User interface changes

none

API changes

none

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Right, testing is broken for Windows environments, rendering core useless for it's biggest audience atm, core developers :) Tested the patch and I guess it can go in for now, at least as a stop-gap solution.

msonnabaum’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.6 KB

I think this approach is a fine workaround. Sorry for not catching that initially.

Here's a version that decomposes that logic out of the simpletest_phpunit_run_command() function.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

The new patch works fine too, it just moved the code around a bit.

geerlingguy’s picture

I'm getting the following errors on Mac OS X, using MAMP with PHP 5.3.14:

Warning: file_get_contents(~/sites/default/files/simpletest/phpunit-2.xml) [function.file-get-contents]: failed to open stream: No such file or directory in simpletest_phpunit_xml_to_rows() (line 733 of core/modules/simpletest/simpletest.module).
Exception: String could not be parsed as XML in SimpleXMLElement->__construct() (line 734 of ~/core/modules/simpletest/simpletest.module).

[Edit: Looks like this may be unrelated; I found that the phpunit test file (supposed to be in public://simpletest) is never created, thus the error for me above.]

das-peter’s picture

Sorry for not catching that initially.

Never mind, I'm aware that I use an OS underdog :P

Patch looks fine -> RTBC

amateescu’s picture

Status: Reviewed & tested by the community » Needs work

Unfortunately, the patch is not fine, OS X has the same issue :(

msonnabaum’s picture

Status: Needs work » Reviewed & tested by the community

It's not the same issue. I've identified the MAMP issue and it's different, just has the same symptom. I'll start a new issue for it.

geerlingguy’s picture

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.