Different configurations when running PHPUnit and Rerunning failed tests

I have a big WordPress installation where I want do run the tests for just one of the plugins. It has its own phpunit.xml and everything is set up correctly as it seems. 

Running the tests works by executing the following command: 

C:\tools\php\php.exe C:\tools\phpunit\phpunit65\phpunit.phar --configuration C:\projects\wordpress-webpapers\wp-content\plugins\russmedia-newspaper-ovb-import\phpunit.xml --teamcity

There are two tests that fail. The idea is to use the "Rerun Failed Tests" functionality to re-execute just the two failed tests, but in that case the command that's run appends the main project directory to the execution and the tests fail due to some other tests that have unresolved issues (or are from external plugins).

C:\tools\php\php.exe C:\tools\phpunit\phpunit65\phpunit.phar --configuration C:\projects\wordpress-webpapers\wp-content\plugins\russmedia-newspaper-ovb-import\phpunit.xml --filter "/(Tests\\Unit\\EPaperPage_Test::testPageScreenshotsAreTaken( .*)?$|Tests\\Unit\\EPaperStructure_Test::testStructureCanBeExportedAsJson( .*)?$)$/" C:\projects\wordpress-webpapers --teamcity

The c:\projects\wordpress-webpapers that's being added to the command leads to the error. If I copy the command and run it in a command prompt it works.

Why is there this difference? How can I get rid of it?

 

0
Avatar
Permanently deleted user

Thank you! In the meantime I was able to get the single methods tests working in the WordPress project (had to add the checked out wordpress-develop to the include path) so the pain is a little alleviated as I'm able to run just the failing test.

0

Cool! Btw, feel free to give a bug report above a vote/comment to get notified about its progress & updates.

0
Avatar
Permanently deleted user

Already did, thank you for your help!

0

请先登录再写评论。