Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function testFactory() |
||
17 | { |
||
18 | $mock = new Client('mock', 'mock'); |
||
19 | |||
20 | foreach (ClassMap::SERVICES as $name => $class) { |
||
21 | $this->assertInstanceOf($class, ServiceFactory::inst($mock, $name)); |
||
22 | $this->assertInstanceOf($class, ServiceFactory::inst($mock, strtoupper($name))); |
||
23 | } |
||
24 | |||
25 | $this->assertEquals(null, ServiceFactory::inst($mock, 'does_not_exist')); |
||
26 | } |
||
28 |