File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,25 @@ public function shouldGetUserOrganizations()
42
42
43
43
$ this ->assertEquals ($ expectedArray , $ api ->organizations ('l3l0 ' ));
44
44
}
45
+ public function shouldGetUserOrgs ()
46
+ {
47
+ $ expectedArray = array (array (
48
+ 'id ' => 202732 ,
49
+ 'url ' => 'https://api.github.com/orgs/KnpLabs ' ,
50
+ 'repos_url ' => 'https://api.github.com/orgs/KnpLabs/repos ' ,
51
+ 'events_url ' => 'https://api.github.com/orgs/KnpLabs/events ' ,
52
+ 'members_url ' => 'https://api.github.com/orgs/KnpLabs/members{/member} ' ,
53
+ 'public_members_url ' => 'https://api.github.com/orgs/KnpLabs/public_members{/member} '
54
+ ));
45
55
56
+ $ api = $ this ->getApiMock ();
57
+ $ api ->expects ($ this ->once ())
58
+ ->method ('get ' )
59
+ ->with ('/user/orgs ' )
60
+ ->will ($ this ->returnValue ($ expectedArray ));
61
+
62
+ $ this ->assertEquals ($ expectedArray , $ api ->orgs ());
63
+ }
46
64
/**
47
65
* @test
48
66
*/
You can’t perform that action at this time.
0 commit comments