File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
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 @@ -10,20 +10,20 @@ class RateLimitTest extends TestCase
1010 */
1111 public function shouldReturnRateLimitArray ()
1212 {
13- $ expectedArray = [
14- 'resources ' => [
15- 'core ' => [
13+ $ expectedArray = array (
14+ 'resources ' => array (
15+ 'core ' => array (
1616 'limit ' => 5000 ,
1717 'remaining ' => 4999 ,
1818 'reset ' => 1372700873
19- ] ,
20- 'search ' => [
19+ ) ,
20+ 'search ' => array (
2121 'limit ' => 30 ,
2222 'remaining ' => 18 ,
2323 'reset ' => 1372697452
24- ]
25- ]
26- ] ;
24+ )
25+ )
26+ ) ;
2727
2828 $ api = $ this ->getApiMock ();
2929 $ api ->expects ($ this ->once ())
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ 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 );
18+ $ this ->assertArraySubset (array ( 'resources ' => array ( 'core ' => array ( 'limit ' => 60 ))) , $ response );
1919
2020 }
2121
You can’t perform that action at this time.
0 commit comments