| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function test_service_factory() |
||
| 16 | { |
||
| 17 | $client = new App('mock', 'mock'); |
||
| 18 | |||
| 19 | foreach (ClassMap::SERVICES as $service => $class) { |
||
| 20 | $this->assertInstanceOf($class, $client->$service); |
||
| 21 | } |
||
| 22 | |||
| 23 | try { |
||
| 24 | $client->not_existant; |
||
|
|
|||
| 25 | $this->fail('Connector::__get should have thrown an error for a service that does not exist'); |
||
| 26 | } catch (BadMethodException $e) { |
||
| 27 | // Error should be thrown |
||
| 47 |