Exemplo n.º 1
0
 /**
  * @test
  * @expectedException Exception
  */
 public function shouldThrowExceptionIfEndpointsNotReturned()
 {
     $guzzleResponse = $this->getMock('Guzzle\\Http\\Message\\Response', array('json'), array(''));
     $guzzleResponse->expects($this->once())->method('json')->will($this->returnValue(''));
     $httpClient = $this->getHttpClientMock();
     $httpClient->expects($this->once())->method('get')->will($this->returnValue($guzzleResponse));
     $client = new Client($httpClient);
     $urls = $client->getRestEndpoints('My.Company', 'My.Login', 'Battery.Horse.Staple', $httpClient);
 }