Skip to content

Commit 8b36478

Browse files
committed
fix tests relative to constructor arguments changing
1 parent c1baf7f commit 8b36478

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

test/Github/Tests/Api/AbstractApiTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function getAbstractApiObject($client)
126126
*/
127127
protected function getClientMock()
128128
{
129-
return new \Github\Client($this->getHttpClientMock());
129+
return new \Github\Client($this->getHttpMock());
130130
}
131131

132132
/**

test/Github/Tests/Api/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected function getApiMock()
2323

2424
$mock = $this->getMock('Github\HttpClient\HttpClient', array(), array(array(), $httpClient));
2525

26-
$client = new \Github\Client($httpClient);
26+
$client = new \Github\Client($mock);
2727
$client->setHttpClient($mock);
2828

2929
return $this->getMockBuilder($this->getApiClass())

test/Github/Tests/HttpClient/CachedHttpClientTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function shouldCacheResponseAtFirstTime()
1616
$cache = $this->getCacheMock();
1717
$httpClient = new CachedHttpClient(
1818
array('base_url' => ''),
19-
$this->getMock('Buzz\Client\ClientInterface'),
19+
$this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send')),
2020
$cache
2121
);
2222

@@ -30,7 +30,7 @@ public function shouldCacheResponseAtFirstTime()
3030
*/
3131
public function shouldGetCachedResponseWhileResourceNotModified()
3232
{
33-
$client = $this->getMock('Buzz\Client\ClientInterface');
33+
$client = $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
3434
$client->expects($this->once())->method('send');
3535

3636
$cache = $this->getCacheMock();
@@ -54,7 +54,7 @@ public function shouldGetCachedResponseWhileResourceNotModified()
5454
*/
5555
public function shouldRenewCacheWhenResourceHasChanged()
5656
{
57-
$client = $this->getMock('Buzz\Client\ClientInterface');
57+
$client = $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
5858
$client->expects($this->once())->method('send');
5959

6060
$cache = $this->getCacheMock();

test/Github/Tests/HttpClient/HttpClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function shouldThrowExceptionWhenApiIsExceeded()
193193

194194
protected function getBrowserMock()
195195
{
196-
return $this->getMock('Buzz\Client\ClientInterface');
196+
return $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
197197
}
198198
}
199199

0 commit comments

Comments
 (0)