protected assertEndpointCalled ( $userFunction, $endpoint, string $method = 'GET', $additionalAsserts = [] ) | ||
$userFunction | ||
$endpoint | - An array containing [request method, endpoint path] | |
$method | string |
protected function assertEndpointCalled($userFunction, $endpoint, $method = 'GET', $additionalAsserts = [])
{
$this->mockAPIResponses([new Response(200, [], '')]);
call_user_func($userFunction);
$this->assertLastRequestIs(array_merge($additionalAsserts, ['method' => $method, 'endpoint' => $endpoint]));
}