Zendesk\API\UnitTests\BasicTest::assertEndpointCalled PHP Method

assertEndpointCalled() protected method

Test for the endpoint using the given method and endpoint
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]));
    }