Exemplo n.º 1
0
 /**
  * Check config with option resolver.
  * Apply each vhost config with VhostManager
  *
  * @param array $config
  */
 public function manageConfig(array $config)
 {
     $this->clientPool->setConnections($config['connections']);
     foreach ($config['vhosts'] as $name => $vhostConfig) {
         $this->vhostManager->processVhost($name, $vhostConfig);
     }
 }
Exemplo n.º 2
0
 public function testClient()
 {
     $pool = new ClientPool($this->factory);
     $this->factory->expects($this->once())->method('createClient')->with(['info'])->willReturn('client1');
     $pool->setConnections(['ulrich' => ['info']]);
     $client1 = $pool->getClientByName('ulrich');
     $this->assertEquals($client1, $pool->getClientByName('ulrich'));
 }