@@ -124,6 +124,17 @@ public function shouldGetApiInstance($apiName, $class)
124124 $ this ->assertInstanceOf ($ class , $ client ->api ($ apiName ));
125125 }
126126
127+ /**
128+ * @test
129+ * @dataProvider getApiClassesProvider
130+ */
131+ public function shouldGetMagicApiInstance ($ apiName , $ class )
132+ {
133+ $ client = new Client ();
134+
135+ $ this ->assertInstanceOf ($ class , $ client ->$ apiName ());
136+ }
137+
127138 /**
128139 * @test
129140 * @expectedException InvalidArgumentException
@@ -142,9 +153,11 @@ public function getApiClassesProvider()
142153
143154 array ('me ' , 'Github\Api\CurrentUser ' ),
144155 array ('current_user ' , 'Github\Api\CurrentUser ' ),
156+ array ('currentUser ' , 'Github\Api\CurrentUser ' ),
145157
146158 array ('git ' , 'Github\Api\GitData ' ),
147159 array ('git_data ' , 'Github\Api\GitData ' ),
160+ array ('gitData ' , 'Github\Api\GitData ' ),
148161
149162 array ('gist ' , 'Github\Api\Gists ' ),
150163 array ('gists ' , 'Github\Api\Gists ' ),
@@ -163,7 +176,9 @@ public function getApiClassesProvider()
163176 array ('repositories ' , 'Github\Api\Repo ' ),
164177
165178 array ('pr ' , 'Github\Api\PullRequest ' ),
179+ array ('pullRequest ' , 'Github\Api\PullRequest ' ),
166180 array ('pull_request ' , 'Github\Api\PullRequest ' ),
181+ array ('pullRequests ' , 'Github\Api\PullRequest ' ),
167182 array ('pull_requests ' , 'Github\Api\PullRequest ' ),
168183
169184 array ('authorization ' , 'Github\Api\Authorizations ' ),
0 commit comments