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

Files: 
CommentFileSizeAuthor
#2 drupal-simpletest-phpunit-windows-2.patch1.6 KBmsonnabaum
PASSED: [[SimpleTest]]: [MySQL] 52,478 pass(es).
[ View ]
drupal-simpletest-phpunit-windows.patch1.03 KBdas-peter
PASSED: [[SimpleTest]]: [MySQL] 52,450 pass(es).
[ View ]

Comments

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.

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new1.6 KB
PASSED: [[SimpleTest]]: [MySQL] 52,478 pass(es).
[ View ]

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.

Status:Needs review» Reviewed & tested by the community

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

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.]

Sorry for not catching that initially.

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

Patch looks fine -> RTBC

Status:Reviewed & tested by the community» Needs work

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

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.

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.