| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function testCreateService() |
||
| 23 | { |
||
| 24 | $configuration = [ |
||
| 25 | 'pami_module' => [ |
||
| 26 | 'connection' => [ |
||
| 27 | 'default' => [ |
||
| 28 | 'host' => 'local.host', |
||
| 29 | 'scheme' => 'tcp://', |
||
| 30 | 'port' => 123, |
||
| 31 | 'username' => 'admin', |
||
| 32 | 'secret' => 'foosecret', |
||
| 33 | 'connect_timeout' => 123, |
||
| 34 | 'read_timeout' => 123, |
||
| 35 | ], |
||
| 36 | ], |
||
| 37 | ], |
||
| 38 | ]; |
||
| 39 | |||
| 40 | $serviceManager = $this->moduleLoader->getServiceManager(); |
||
| 41 | $serviceManager->setAllowOverride(true); |
||
| 42 | |||
| 43 | $config = $serviceManager->get('config'); |
||
| 44 | $config = ArrayUtils::merge($config, $configuration); |
||
| 45 | $serviceManager->setService('config', $config); |
||
| 46 | |||
| 47 | $factory = new ConnectionFactory('default'); |
||
| 48 | $service = $factory->createService($serviceManager); |
||
| 49 | |||
| 50 | static::assertInstanceOf('PAMI\\Client\\Impl\\ClientImpl', $service); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |