sebastianbergmann/phpunit — Issue #470: on the removal of the customMessage property from PHPUnit_Framework_ExpectationFailedException
Author: psemuu
Created: 2012-01-27 12:38:51+00:00
State: open

While overriding the PHPUnit_Extensions_SeleniumTestCase::onNotSuccessfulTest method some problems became apparent.
There are no means to modify the message of the exception that caused our test to fail. This is exactly because the customMessage property was removed from PHPUnit_Framework_ExpectationFailedException.
If we try to throw a new exception we lose the trace and the trace property of the Exception class is private, so we cannot modify it in derived classes.
This was commented on here:
https://github.com/sebastianbergmann/phpunit-selenium/issues/84#issuecomment-3685605