File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function all($id = null)
40
40
return $ this ->get ('/users ' );
41
41
}
42
42
43
- return $ this ->get ('/users? since= ' . rawurldecode ($ id ));
43
+ return $ this ->get ('/users ' , [ ' since ' => rawurldecode ($ id )] );
44
44
}
45
45
46
46
/**
Original file line number Diff line number Diff line change @@ -82,6 +82,25 @@ public function shouldGetAllUsers()
82
82
$ this ->assertEquals ($ expectedArray , $ api ->all ());
83
83
}
84
84
85
+ /**
86
+ * @test
87
+ */
88
+ public function shouldGetAllUsersSince ()
89
+ {
90
+ $ expectedArray = array (
91
+ array ('id ' => 3 , 'username ' => 'test3 ' ),
92
+ array ('id ' => 4 , 'username ' => 'test4 ' )
93
+ );
94
+
95
+ $ api = $ this ->getApiMock ();
96
+ $ api ->expects ($ this ->once ())
97
+ ->method ('get ' )
98
+ ->with ('/users ' , ['since ' => 2 ])
99
+ ->will ($ this ->returnValue ($ expectedArray ));
100
+
101
+ $ this ->assertEquals ($ expectedArray , $ api ->all (2 ));
102
+ }
103
+
85
104
/**
86
105
* @test
87
106
*/
You can’t perform that action at this time.
0 commit comments