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 44
55use Github \Api \ApiInterface ;
66use Github \Exception \InvalidArgumentException ;
7+ use Github \Exception \BadMethodCallException ;
78use Github \HttpClient \HttpClient ;
89use Github \HttpClient \HttpClientInterface ;
910
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 <[email protected] > 9+ */
10+ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
11+ {
12+
13+ }
Original file line number Diff line number Diff line change 44
55use Github \Client ;
66use Github \Exception \InvalidArgumentException ;
7+ use Github \Exception \BadMethodCallException ;
78
89class ClientTest extends \PHPUnit_Framework_TestCase
910{
@@ -145,6 +146,16 @@ public function shouldNotGetApiInstance()
145146 $ client ->api ('do_not_exist ' );
146147 }
147148
149+ /**
150+ * @test
151+ * @expectedException BadMethodCallException
152+ */
153+ public function shouldNotGetMagicApiInstance ()
154+ {
155+ $ client = new Client ();
156+ $ client ->doNotExist ();
157+ }
158+
148159 public function getApiClassesProvider ()
149160 {
150161 return array (
You can’t perform that action at this time.
0 commit comments