Discogs\Test\ClientTest::createClient PHP Method

createClient() protected method

protected createClient ( $mock, GuzzleHttp\Subscriber\History $history )
$history GuzzleHttp\Subscriber\History
    protected function createClient($mock, History $history)
    {
        $path = sprintf('%s/../../fixtures/%s', __DIR__, $mock);
        $client = ClientFactory::factory();
        $httpClient = $client->getHttpClient();
        $mock = new Mock([$path]);
        $httpClient->getEmitter()->attach($mock);
        $httpClient->getEmitter()->attach($history);
        return $client;
    }