| @@ 914-927 (lines=14) @@ | ||
| 911 | /** |
|
| 912 | * @expectedException InvalidArgumentException |
|
| 913 | */ |
|
| 914 | public function testNonExistentMethods() |
|
| 915 | { |
|
| 916 | $injector = new Injector(); |
|
| 917 | $config = array( |
|
| 918 | 'TestService' => array( |
|
| 919 | 'class' => TestObject::class, |
|
| 920 | 'calls' => array( |
|
| 921 | array('thisDoesntExist') |
|
| 922 | ) |
|
| 923 | ) |
|
| 924 | ); |
|
| 925 | ||
| 926 | $injector->load($config); |
|
| 927 | $item = $injector->get('TestService'); |
|
| 928 | } |
|
| 929 | ||
| 930 | /** |
|
| @@ 933-946 (lines=14) @@ | ||
| 930 | /** |
|
| 931 | * @expectedException InvalidArgumentException |
|
| 932 | */ |
|
| 933 | public function testProtectedMethods() |
|
| 934 | { |
|
| 935 | $injector = new Injector(); |
|
| 936 | $config = array( |
|
| 937 | 'TestService' => array( |
|
| 938 | 'class' => TestObject::class, |
|
| 939 | 'calls' => array( |
|
| 940 | array('protectedMethod') |
|
| 941 | ) |
|
| 942 | ) |
|
| 943 | ); |
|
| 944 | ||
| 945 | $injector->load($config); |
|
| 946 | $item = $injector->get('TestService'); |
|
| 947 | } |
|
| 948 | ||
| 949 | /** |
|