File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Github \Api \ApiInterface ;
6
6
use Github \Exception \InvalidArgumentException ;
7
+ use Github \Exception \BadMethodCallException ;
7
8
use Github \HttpClient \HttpClient ;
8
9
use Github \HttpClient \HttpClientInterface ;
9
10
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Github \Exception ;
4
+
5
+ /**
6
+ * BadMethodCallException
7
+ *
8
+ * @author James Brooks <jbrooksuk@me.com>
9
+ */
10
+ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
11
+ {
12
+
13
+ }
Original file line number Diff line number Diff line change 4
4
5
5
use Github \Client ;
6
6
use Github \Exception \InvalidArgumentException ;
7
+ use Github \Exception \BadMethodCallException ;
7
8
8
9
class ClientTest extends \PHPUnit_Framework_TestCase
9
10
{
@@ -145,6 +146,16 @@ public function shouldNotGetApiInstance()
145
146
$ client ->api ('do_not_exist ' );
146
147
}
147
148
149
+ /**
150
+ * @test
151
+ * @expectedException BadMethodCallException
152
+ */
153
+ public function shouldNotGetMagicApiInstance ()
154
+ {
155
+ $ client = new Client ();
156
+ $ client ->doNotExist ();
157
+ }
158
+
148
159
public function getApiClassesProvider ()
149
160
{
150
161
return array (
You can’t perform that action at this time.
0 commit comments