public function testTrackContext() { $tracking = new Ups\Tracking(); $tracking->setRequest($request = new RequestMock(null, '/Track/Response2.xml')); $tracking->setContext('unit test'); $tracking->track('1Z12345E0000000000'); $response = $tracking->getResponse()->getResponse(); // Test context $this->assertEquals('unit test', $response->Response->TransactionReference->CustomerContext); }
/** * @param ResponseInterface $response * * @return $this */ public function setResponse(ResponseInterface $response) { $this->upsTracking->setResponse($response); return $this; }