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])); }