$this->
assertEquals( $connection =
new Connection([], Pheanstalk::
create('foobar', 15555
)),
Connection::
fromDsn('beanstalkd://foobar:15555'
) );
$configuration =
$connection->
getConfiguration();
$this->
assertSame('default',
$configuration['tube_name'
]);
$this->
assertSame(0,
$configuration['timeout'
]);
$this->
assertSame(90,
$configuration['ttr'
]);
$this->
assertSame('default',
$connection->
getTube());
} public function testFromDsnWithOptions() { $this->
assertEquals( $connection = Connection::
fromDsn('beanstalkd://localhost',
['tube_name' => 'foo', 'timeout' => 10, 'ttr' => 5000
]),
Connection::
fromDsn('beanstalkd://localhost?tube_name=foo&timeout=10&ttr=5000'
) );
$configuration =
$connection->
getConfiguration();