Ejemplo n.º 1
0
 /**
  * @return HttpClient
  */
 public function getHttpClient()
 {
     if (null === $this->httpClient) {
         $this->httpClient = $this->getServiceManager()->get('HD\\Api\\Client\\HttpClient');
         $errorListener = $this->getServiceManager()->get('HD\\Api\\Client\\Listener\\Error');
         $eventManager = $this->httpClient->getEventManager();
         $eventManager->attachAggregate($errorListener);
     }
     return $this->httpClient;
 }
Ejemplo n.º 2
0
 public function testSetEventManager()
 {
     $client = new Client();
     $result = $client->setEventManager(new EventManager());
     $this->assertInstanceOf('HD\\Api\\Client\\Client', $result);
 }