Test with failed expectation on value passed to mocked method is incorrectly considered risky #6138
Labels
feature/test-doubles
Test Stubs and Mock Objects
type/bug
Something is broken
version/11
Something affects PHPUnit 11
version/12
Something affects PHPUnit 12
Running the test shown above yields the output shown below:
The test is correctly considered to have failed. It is incorrectly considered to be risky as it did perform an assertion (expectations on mock objects are assertions).
Running the test shown (which calls
$i->m(new C('bar'));
instead of$i->m(new C('baz'));
) above yields the output shown below:The expectation succeeds, is counted as an assertions, and the test is therefore not considered to be risky.
The text was updated successfully, but these errors were encountered: