Open robiningelbrecht opened 1 year ago
@robiningelbrecht
You could subscribe to the
PHPUnit\Event\Test\AssertionFailed
PHPUnit\Event\Test\AssertionSucceeded
PHPUnit\Event\Test\Failed
PHPUnit\Event\Test\Succeeded
events and collect the number of failed and succeeded assertions and tests.
Would that help?
Since PHPunit 10 we need to use events and extensions to write plugins. I'm currently writing a plugin where I would need the total amount of assertions, passed and failed tests after the tests have ran.
There's a
numberOfAssertionsPerformed()
method on the Test lifecycle Finished event, but I think it would be useful to add this to the finished event of the TestSuite as well?Or am I missing something and is this already available somewhere else?