You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message that I get when the test fails (because the code being tested doesn't actually call passthru() yet) is like this:
1) Tests\MyProjectTest::myTestMethod
Expectation failed for method name is equal to <string:delegate> when invoked 2 time(s).
Method was expected to be called 2 times, actually called 0 times.
Instead of <string:delegate> it would be helpful if it said passthru, or even better, something like: Expectation failed for passthru to be invoked 2 time(s)
I know the matchers and exceptions come from PHPUnit, but is there a way to send in better messages?
The text was updated successfully, but these errors were encountered:
I noticed this already and started to fix that in the branch useful-message. Unfortunately the time I spent on that was not sufficient to completely understand the PHPUnit model.
I'm happy for any pull requests regarding this topic. It's a valid issue, so I'll leave this here open.
First of all I just want to say I really like the library, thank you so much for creating it :)
I do think this Exception Message should be improved.
When I create a mocked function like so:
The error message that I get when the test fails (because the code being tested doesn't actually call
passthru()
yet) is like this:Instead of
<string:delegate>
it would be helpful if it saidpassthru
, or even better, something like:Expectation failed for passthru to be invoked 2 time(s)
I know the matchers and exceptions come from PHPUnit, but is there a way to send in better messages?
The text was updated successfully, but these errors were encountered: