PHPStorm 8 and PHPUnit problems with @runInSeparateProcess
Hi,
I am using PHPStorm 8 and when I start my Tests Suite, which is using a composer provisioned phpunit (currently version 4.8), I experienced the following problems:
First problem: PHPStorm is not displaying the statistics about the results of the tests but fortunately I can still read the result from the output generated.
Second problem: when I mark a test or even the entire testcase to be runned in a separate process PHPStorm is hanging forever with the status "Instantiating tests ..." without showing any result output.
The second problem disappear if I remove the @runInSeparateProcess annotation, while the first seems to always occur.
Any suggestion?
PS: I cannot remove the @runInSeparateProcess because it is needed for a particular testcase which involves mocking PHP built-in functions and in order to guarantee the context (for php > 5.3 https://bugs.php.net/bug.php?id=68541) I've to run it in a separate process.
请先登录再写评论。
I've just made progress with that.
I've added within the PHPUnit configuration the vendor/autoload.php file (For some reason I was using the vendor/bin/phpunit and it was not complaining about it) and this fixed the *First Problem* so now is displaying the statistics and following the test/testcases.
Also fixing the first problem is behaving differently with respect to the @runInSeparateProcess annotation, it's now displaying the following Fatal Error for every marked test:
Apparently removing all dependencies and re-installing phpunit from composer (phpunit 4.8.6) solved the problem.