예제 #1
0
 public function __construct(Config $config)
 {
     $this->apiKey = $config->getApiKey();
     $this->baseUrl = $config->getBaseUrl();
     $this->acceptLanguage = $config->getAcceptLanguage();
     $this->httpHandler = $config->getHttpHandler();
     $this->trackingIdHandler = new TrackingIdHandler($config->getTrackingIdCallback(), $config->getStoreTrackingIdCallback());
 }
예제 #2
0
 public function test_override_http_handler()
 {
     $httpHandler = $this->prophesize(HttpHandler::class)->reveal();
     $configArray = $this->getValidConfigArray();
     $configArray[Config::HTTP_HANDLER] = $httpHandler;
     $config = new Config($configArray);
     $this->assertSame($httpHandler, $config->getHttpHandler());
 }