File tree Expand file tree Collapse file tree 3 files changed +10
-14
lines changed Expand file tree Collapse file tree 3 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 1010 */
1111class RateLimit extends AbstractApi
1212{
13-
1413 /**
1514 * Get rate limits
1615 *
@@ -42,5 +41,4 @@ public function getSearchLimit()
4241 $ response = $ this ->getRateLimits ();
4342 return $ response ['resources ' ]['search ' ]['limit ' ];
4443 }
45-
4644}
Original file line number Diff line number Diff line change 44
55class RateLimitTest extends TestCase
66{
7-
87 /**
98 * @test
109 */
1110 public function shouldReturnRateLimitArray ()
1211 {
13- $ expectedArray = [
14- 'resources ' => [
15- 'core ' => [
12+ $ expectedArray = array (
13+ 'resources ' => array (
14+ 'core ' => array (
1615 'limit ' => 5000 ,
1716 'remaining ' => 4999 ,
1817 'reset ' => 1372700873
19- ] ,
20- 'search ' => [
18+ ) ,
19+ 'search ' => array (
2120 'limit ' => 30 ,
2221 'remaining ' => 18 ,
2322 'reset ' => 1372697452
24- ]
25- ]
26- ] ;
23+ )
24+ )
25+ ) ;
2726
2827 $ api = $ this ->getApiMock ();
2928 $ api ->expects ($ this ->once ())
@@ -38,4 +37,5 @@ protected function getApiClass()
3837 {
3938 return 'Github\Api\RateLimit ' ;
4039 }
40+
4141}
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ public function shouldRetrievedRateLimits()
1515 $ response = $ this ->client ->api ('rate_limit ' )->getRateLimits ();
1616
1717 $ this ->assertArrayHasKey ('resources ' , $ response );
18- $ this ->assertArraySubset (['resources ' => ['core ' => ['limit ' => 60 ]]], $ response );
19-
18+ $ this ->assertArraySubset (array ('resources ' => array ('core ' => array ('limit ' => 60 ))), $ response );
2019 }
21-
2220}
You can’t perform that action at this time.
0 commit comments