/** * @return \Phlib\Beanstalk\Connection\ConnectionInterface */ public function getBeanstalk() { if (!$this->beanstalk) { $config = $this->getHelper('configuration')->fetch(); $this->beanstalk = Factory::createFromArray($config); } return $this->beanstalk; }
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); }