Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix tests relative to constructor arguments changing

  • Loading branch information...
commit 8b36478fec2c3700df3ba3763c7bbf1c79b4a18b 1 parent c1baf7f
Florian Klein authored November 14, 2012
2  test/Github/Tests/Api/AbstractApiTest.php
@@ -126,7 +126,7 @@ protected function getAbstractApiObject($client)
126 126
      */
127 127
     protected function getClientMock()
128 128
     {
129  
-        return new \Github\Client($this->getHttpClientMock());
  129
+        return new \Github\Client($this->getHttpMock());
130 130
     }
131 131
 
132 132
     /**
2  test/Github/Tests/Api/TestCase.php
@@ -23,7 +23,7 @@ protected function getApiMock()
23 23
 
24 24
         $mock = $this->getMock('Github\HttpClient\HttpClient', array(), array(array(), $httpClient));
25 25
 
26  
-        $client = new \Github\Client($httpClient);
  26
+        $client = new \Github\Client($mock);
27 27
         $client->setHttpClient($mock);
28 28
 
29 29
         return $this->getMockBuilder($this->getApiClass())
6  test/Github/Tests/HttpClient/CachedHttpClientTest.php
@@ -16,7 +16,7 @@ public function shouldCacheResponseAtFirstTime()
16 16
         $cache = $this->getCacheMock();
17 17
         $httpClient = new CachedHttpClient(
18 18
             array('base_url' => ''),
19  
-            $this->getMock('Buzz\Client\ClientInterface'),
  19
+            $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send')),
20 20
             $cache
21 21
         );
22 22
 
@@ -30,7 +30,7 @@ public function shouldCacheResponseAtFirstTime()
30 30
      */
31 31
     public function shouldGetCachedResponseWhileResourceNotModified()
32 32
     {
33  
-        $client = $this->getMock('Buzz\Client\ClientInterface');
  33
+        $client = $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
34 34
         $client->expects($this->once())->method('send');
35 35
 
36 36
         $cache = $this->getCacheMock();
@@ -54,7 +54,7 @@ public function shouldGetCachedResponseWhileResourceNotModified()
54 54
      */
55 55
     public function shouldRenewCacheWhenResourceHasChanged()
56 56
     {
57  
-        $client = $this->getMock('Buzz\Client\ClientInterface');
  57
+        $client = $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
58 58
         $client->expects($this->once())->method('send');
59 59
 
60 60
         $cache = $this->getCacheMock();
2  test/Github/Tests/HttpClient/HttpClientTest.php
@@ -193,7 +193,7 @@ public function shouldThrowExceptionWhenApiIsExceeded()
193 193
 
194 194
     protected function getBrowserMock()
195 195
     {
196  
-        return $this->getMock('Buzz\Client\ClientInterface');
  196
+        return $this->getMock('Buzz\Client\ClientInterface', array('setTimeout', 'setVerifyPeer', 'send'));
197 197
     }
198 198
 }
199 199
 

0 notes on commit 8b36478

Please sign in to comment.
Something went wrong with that request. Please try again.