function let(HttpClientInterface $httpClient, PostFileFactoryInterface $postFileFactory) { $httpClient->getBaseUrl()->willReturn('http://demo.sylius.org/api/'); $this->beConstructedWith($httpClient, $postFileFactory); }
private function createAuthHttp(ClientInterface $http) { return new Client(['base_url' => $http->getBaseUrl(), 'defaults' => ['exceptions' => true, 'verify' => $http->getDefaultOption('verify'), 'proxy' => $http->getDefaultOption('proxy')]]); }
public function __construct(HttpClientInterface $httpClient, PostFileFactoryInterface $postFileFactory = null) { $this->httpClient = $httpClient; $this->postFileFactory = $postFileFactory ?: new PostFileFactory(); $this->baseUrl = Url::fromString($httpClient->getBaseUrl()); }