Ejemplo n.º 1
0
 /**
  * @return \Phlib\Beanstalk\Connection\ConnectionInterface
  */
 public function getBeanstalk()
 {
     if (!$this->beanstalk) {
         $config = $this->getHelper('configuration')->fetch();
         $this->beanstalk = Factory::createFromArray($config);
     }
     return $this->beanstalk;
 }
Ejemplo n.º 2
0
 public function testCreateConnections()
 {
     $result = true;
     $config = ['host' => 'locahost'];
     $connections = Factory::createConnections([$config, $config, $config]);
     foreach ($connections as $connection) {
         $result = $result && $connection instanceof Connection;
     }
     $this->assertTrue($result);
 }