Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix tests relative to constructor arguments changing

  • Loading branch information...
commit 8b36478fec2c3700df3ba3763c7bbf1c79b4a18b 1 parent c1baf7f
@docteurklein docteurklein authored
View
2  test/Github/Tests/Api/AbstractApiTest.php
@@ -126,7 +126,7 @@ protected function getAbstractApiObject($client)
*/
protected function getClientMock()
{
- return new \Github\Client($this->getHttpClientMock());
+ return new \Github\Client($this->getHttpMock());
}
/**
View
2  test/Github/Tests/Api/TestCase.php
@@ -23,7 +23,7 @@ protected function getApiMock()
$mock = $this->getMock('Github\HttpClient\HttpClient', array(), array(array(), $httpClient));
- $client = new \Github\Client($httpClient);
+ $client = new \Github\Client($mock);
$client->setHttpClient($mock);
return $this->getMockBuilder($this->getApiClass())
View
6 test/Github/Tests/HttpClient/CachedHttpClientTest.php
@@ -16,7 +16,7 @@ public function shouldCacheResponseAtFirstTime()
$cache = $this->getCacheMock();
$httpClient = new CachedHttpClient(
array('base_url' => ''),
- $this->getMock('Buzz\Client\ClientInterface'),
+ $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send')),
$cache
);
@@ -30,7 +30,7 @@ public function shouldCacheResponseAtFirstTime()
*/
public function shouldGetCachedResponseWhileResourceNotModified()
{
- $client = $this->getMock('Buzz\Client\ClientInterface');
+ $client = $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
$client->expects($this->once())->method('send');
$cache = $this->getCacheMock();
@@ -54,7 +54,7 @@ public function shouldGetCachedResponseWhileResourceNotModified()
*/
public function shouldRenewCacheWhenResourceHasChanged()
{
- $client = $this->getMock('Buzz\Client\ClientInterface');
+ $client = $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
$client->expects($this->once())->method('send');
$cache = $this->getCacheMock();
View
2  test/Github/Tests/HttpClient/HttpClientTest.php
@@ -193,7 +193,7 @@ public function shouldThrowExceptionWhenApiIsExceeded()
protected function getBrowserMock()
{
- return $this->getMock('Buzz\Client\ClientInterface');
+ return $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.