public function testModifyProxyCurlSetting() { $proxy = 'tcp://localhost:80'; $client = MeasurementProtocolClient::factory(array('tid' => $this->getTrackingId(), 'curl.options' => array('CURLOPT_PROXY' => $proxy))); $this->getResponse('abstract.collect', array('cid' => $this->getCustomerId()), true, $client); $requestCurlOptions = $this->history->getLastRequest()->getCurlOptions(); $this->assertSame($proxy, $requestCurlOptions[CURLOPT_PROXY]); }
/** * Get the response to the last request made by the Guzzle client * * @return Response */ protected function getLastResponse() { $lastRequest = $this->history->getLastRequest(); if (!$lastRequest) { return null; } return $lastRequest->getResponse(); }