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
When using mock or spy with arguments I am getting a completely un-expected behaviour. If you see the steps to re-produce the given example works fine if the arguments match without any error, but gives totally different error when arguments do not match.
It should display the diff between the argument expected and argument passed.
Actual Behavior
It's acting as if method was never called at all.
Method build(<Any Arguments>) from Mockery_0_Builder should be called
at least 1 times but called 0 times.
Exception or Error
Fatal error: Uncaught Mockery\Exception\InvalidCountException: Method build(<Any Arguments>) from Mockery_0_Builder should be called
at least 1 times but called 0 times. in ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php:42
Stack trace:
#0 ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/Expectation.php(739): Mockery\CountValidator\AtLeast->validate(0)
#1 ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php(36): Mockery\Expectation->verify()
#2 ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/VerificationDirector.php(86): Mockery\ReceivedMethodCalls->verify(Object(Mockery\VerificationExpectation))
#3 ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/VerificationDirector.php(143): Mockery\VerificationDirector->verify()
#4 ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/VerificationDirector.php(98): Mockery\VerificationDirector->cloneApplyAndVerify('with', Array)
#5 ~/Herd/tinyphp/test.php(15): Mockery\VerificationDirector->with(1)
#6 {main}
thrown in ~/Herd/tinyphp/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php on line 42
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Mockery Version
1.6.12
PHP Version
PHP 8.3
Issue Description
When using mock or spy with arguments I am getting a completely un-expected behaviour. If you see the steps to re-produce the given example works fine if the arguments match without any error, but gives totally different error when arguments do not match.
Steps to Reproduce
Paste this in a file and run it.
Expected Behavior
It should display the diff between the argument expected and argument passed.
Actual Behavior
It's acting as if method was never called at all.
Exception or Error
Additional Information
No response
The text was updated successfully, but these errors were encountered: