Test\Passed
event is not emitted for PHPT tests
#5898
Labels
feature/events
Issues related to PHPUnit's event system
feature/phpt
End-to-end tests in PHPT format
feature/test-runner
CLI test runner
type/bug
Something is broken
version/10
Something affects PHPUnit 10
version/11
Something affects PHPUnit 11
Summary
When a test succeeds, it usually emits the
PHPUnit\Event\Test\Passed
event. When it fails (an assertion), it emitsPHPUnit\Event\Test\Failed
. However, PHPT tests do not follow suit; they do correctly emit theFailed
event, but thePassed
event is not so emitted. They do emitAssertionSucceeded
, but as this is marked@deprecated
, one supposes one cannot rely on this (and it is removed in v11).Current behavior
PHPT tests do not emit the
PHPUnit\Event\Test\Passed
event when they pass.How to reproduce
Write PHPT test with
--EXPECTF--
section that passes.Expected behavior
PHPUnit\Event\Test\Passed
event is emitted.The text was updated successfully, but these errors were encountered: