File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,29 @@ public function shouldShowUser()
2020 $ this ->assertEquals ($ expectedArray , $ api ->show ('l3l0 ' ));
2121 }
2222
23+ /**
24+ * @test
25+ */
26+ public function shouldGetUserOrganizations ()
27+ {
28+ $ expectedArray = array (array (
29+ 'id ' => 202732 ,
30+ 'url ' => 'https://api.github.com/orgs/KnpLabs ' ,
31+ 'repos_url ' => 'https://api.github.com/orgs/KnpLabs/repos ' ,
32+ 'events_url ' => 'https://api.github.com/orgs/KnpLabs/events ' ,
33+ 'members_url ' => 'https://api.github.com/orgs/KnpLabs/members{/member} ' ,
34+ 'public_members_url ' => 'https://api.github.com/orgs/KnpLabs/public_members{/member} '
35+ ));
36+
37+ $ api = $ this ->getApiMock ();
38+ $ api ->expects ($ this ->once ())
39+ ->method ('get ' )
40+ ->with ('users/l3l0/orgs ' )
41+ ->will ($ this ->returnValue ($ expectedArray ));
42+
43+ $ this ->assertEquals ($ expectedArray , $ api ->organizations ('l3l0 ' ));
44+ }
45+
2346 /**
2447 * @test
2548 */
You can’t perform that action at this time.
0 commit comments