Debug parameters in Mockery\Exception\NoMatchingExpectationException: No matching handler found for

raw

README.rst

Error:

1) Tests\Unit\Listeners\SvActionToBackofficeLogTest::testHandleDeviceInRemoteWhitelistResult
Mockery\Exception\NoMatchingExpectationException: No matching handler found for Mockery_0_Engineroom_Lib_Backoffice::sendRequest('POST', 'notification/devices/log/5', ['short_message' => [...], 'message' => '', 'details' => [...]]). Either the method was unexpected or its arguments matched no expected argument list for this method

How to debug this?

Dump the parameters the mock gets!:

MyFacade::shouldReceive('sendRequest')->once()
    ->withArgs(function () {
        var_dump(func_get_args());
    });
Christian Weiske Christian Weiske
owner

History