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)
4040 return $ this ->get ('/users ' );
4141 }
4242
43- return $ this ->get ('/users? since= ' . rawurldecode ($ id ));
43+ return $ this ->get ('/users ' , [ ' since ' => rawurldecode ($ id )] );
4444 }
4545
4646 /**
Original file line number Diff line number Diff line change @@ -82,6 +82,25 @@ public function shouldGetAllUsers()
8282 $ this ->assertEquals ($ expectedArray , $ api ->all ());
8383 }
8484
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+
85104 /**
86105 * @test
87106 */
You can’t perform that action at this time.
0 commit comments