2

I have my test class like this:

/**
 * @runTestsInSeparateProcesses
 */
class ProfileTest extends TestCase
{
    public function testFalsePositive()
    {
        $this->assertFalse(true);
    }
}

And the weird thing is, this test class passes successfully.

If I remove annotation "runTestsInSeparateProcesses" - then it gives me correct result (failing test). Another weird thing is, that in my other test cases, there should be "call method on null" exception, and even though phpunit cheerfully informed me, that tests passed correctly. I'm sure, that phpunit command catches my testclass.

I'm using PHPUnit v.7.4.1.

Can anybody tell me what's going on?

IFeel3
  • 167
  • 1
  • 13
  • 1
    Question. Does it work if you use a previous version of phpunit? – Jonnix Oct 24 '18 at 09:45
  • Hey, I've checked it with PHPUnit 5, and, surprisingly, it gives me expected error. I guess i should create a bug on PHPUnit repository? – IFeel3 Oct 24 '18 at 09:57
  • Raise it on github. I spotted a random issue on there that has the same cause but not sure the same effect, so may or may not be the same issue. Afaics 7.4.1 is pretty new? – Jonnix Oct 24 '18 at 09:58
  • Yes, I have just updated it to the newest version. I'm posting a bug. – IFeel3 Oct 24 '18 at 10:04
  • Good job. Please post an edit of your question with the issue link so others can track it too :) – Jonnix Oct 24 '18 at 10:05
  • Thank you for helping! https://github.com/sebastianbergmann/phpunit/issues/3367 – IFeel3 Oct 24 '18 at 10:15

0 Answers0