function-mocker icon indicating copy to clipboard operation
function-mocker copied to clipboard

Is there a possibility to see what a function was called with?

Open abdessamadely opened this issue 2 years ago • 0 comments

Hello,

I have a situation, where I check with wasCalledWithOnce something like this:

$mock_func->wasCalledWithOnce([
    0,
    [],
    [
        'key_1' => [
            [
                'key_1_1' => [
                    [
                        'key' => null,
                        'another_key' => null,
                        'another_one' => 0
                    ]
                ]
            ]
        ],
        'key_2' => 0,
        'key_3' => 0,
        'key_4' => null,
    ],
    0
]);

It's failing at the third argument, The args values are valid, and I can't see where the issue is.

So my question is: Is there any way I can print the diff between what I give it and what the actual args, like what assertEqual is doing?

Thanks,

abdessamadely avatar Jun 29 '22 11:06 abdessamadely