Example #1
0
 /**
  * Get a TMDB Client with an mocked HTTP dependency
  *
  * @return \Tmdb\Client
  */
 protected function getClientWithMockedHttpClient()
 {
     $token = new ApiToken('abcdef');
     $httpClient = $this->getMockedHttpClient();
     $httpClient->expects($this->any())->method('send');
     $mock = $this->getMock('Tmdb\\HttpClient\\HttpClientInterface', array(), array(array(), $httpClient));
     $client = new \Tmdb\Client($token, $httpClient);
     $client->setHttpClient($mock);
     return $client;
 }