@@ -124,6 +124,17 @@ public function shouldGetApiInstance($apiName, $class)
124
124
$ this ->assertInstanceOf ($ class , $ client ->api ($ apiName ));
125
125
}
126
126
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
+
127
138
/**
128
139
* @test
129
140
* @expectedException InvalidArgumentException
@@ -142,9 +153,11 @@ public function getApiClassesProvider()
142
153
143
154
array ('me ' , 'Github\Api\CurrentUser ' ),
144
155
array ('current_user ' , 'Github\Api\CurrentUser ' ),
156
+ array ('currentUser ' , 'Github\Api\CurrentUser ' ),
145
157
146
158
array ('git ' , 'Github\Api\GitData ' ),
147
159
array ('git_data ' , 'Github\Api\GitData ' ),
160
+ array ('gitData ' , 'Github\Api\GitData ' ),
148
161
149
162
array ('gist ' , 'Github\Api\Gists ' ),
150
163
array ('gists ' , 'Github\Api\Gists ' ),
@@ -163,7 +176,9 @@ public function getApiClassesProvider()
163
176
array ('repositories ' , 'Github\Api\Repo ' ),
164
177
165
178
array ('pr ' , 'Github\Api\PullRequest ' ),
179
+ array ('pullRequest ' , 'Github\Api\PullRequest ' ),
166
180
array ('pull_request ' , 'Github\Api\PullRequest ' ),
181
+ array ('pullRequests ' , 'Github\Api\PullRequest ' ),
167
182
array ('pull_requests ' , 'Github\Api\PullRequest ' ),
168
183
169
184
array ('authorization ' , 'Github\Api\Authorizations ' ),
0 commit comments