Currently I have something like that (simplified version)
app(ShopifySDK::class)->Order->get($params)
How can I mock this class and check get()
method input?
This is not working.
$this->app->bind(ShopifySDK::class, function () {
return Mockery::mock(ShopifySDK::class)
->shouldReceive('Order->get')
->once()
->with([
'status' => 'any',
'updated_at_min' => '2010-01-01T00:00:00+00:00',
'order' => 'updated_at asc',
'limit' => 250,
'page' => 1,
])->getMock();
});
and gives such an error
ErrorException : Undefined property: Mockery_1__demeter_d588e5bd79af839e05009e561399d4e0_Order::$Order