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 10
10
*/
11
11
class RateLimit extends AbstractApi
12
12
{
13
-
14
13
/**
15
14
* Get rate limits
16
15
*
@@ -42,5 +41,4 @@ public function getSearchLimit()
42
41
$ response = $ this ->getRateLimits ();
43
42
return $ response ['resources ' ]['search ' ]['limit ' ];
44
43
}
45
-
46
44
}
Original file line number Diff line number Diff line change @@ -10,20 +10,20 @@ class RateLimitTest extends TestCase
10
10
*/
11
11
public function shouldReturnRateLimitArray ()
12
12
{
13
- $ expectedArray = [
14
- 'resources ' => [
15
- 'core ' => [
13
+ $ expectedArray = array (
14
+ 'resources ' => array (
15
+ 'core ' => array (
16
16
'limit ' => 5000 ,
17
17
'remaining ' => 4999 ,
18
18
'reset ' => 1372700873
19
- ] ,
20
- 'search ' => [
19
+ ) ,
20
+ 'search ' => array (
21
21
'limit ' => 30 ,
22
22
'remaining ' => 18 ,
23
23
'reset ' => 1372697452
24
- ]
25
- ]
26
- ] ;
24
+ )
25
+ )
26
+ ) ;
27
27
28
28
$ api = $ this ->getApiMock ();
29
29
$ api ->expects ($ this ->once ())
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public function shouldRetrievedRateLimits()
15
15
$ response = $ this ->client ->api ('rate_limit ' )->getRateLimits ();
16
16
17
17
$ this ->assertArrayHasKey ('resources ' , $ response );
18
- $ this ->assertArraySubset ([ 'resources ' => [ 'core ' => [ 'limit ' => 60 ]]] , $ response );
18
+ $ this ->assertArraySubset (array ( 'resources ' => array ( 'core ' => array ( 'limit ' => 60 ))) , $ response );
19
19
20
20
}
21
21
You can’t perform that action at this time.
0 commit comments