mirror of
https://github.com/predis/predis.git
synced 2026-10-06 20:09:25 +00:00
Add support for the 'redis://' scheme in URI strings.
The URI string will be handled following the rules as described by the the provisional IANA registration document that can be found on IANA's website: http://www.iana.org/assignments/uri-schemes/prov/redis.
This commit is contained in:
@@ -29,12 +29,34 @@ class CompositeStreamConnectionTest extends PredisConnectionTestCase
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testExposesParameters()
|
||||
public function testSupportsSchemeTCP()
|
||||
{
|
||||
$parameters = $this->getParameters();
|
||||
$connection = new CompositeStreamConnection($parameters);
|
||||
$parameters = $this->getParameters(array('scheme' => 'tcp'));
|
||||
$connection = new StreamConnection($parameters);
|
||||
|
||||
$this->assertSame($parameters, $connection->getParameters());
|
||||
$this->assertInstanceOf('Predis\Connection\NodeConnectionInterface', $connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testSupportsSchemeRedis()
|
||||
{
|
||||
$parameters = $this->getParameters(array('scheme' => 'redis'));
|
||||
$connection = new StreamConnection($parameters);
|
||||
|
||||
$this->assertInstanceOf('Predis\Connection\NodeConnectionInterface', $connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testSupportsSchemeUnix()
|
||||
{
|
||||
$parameters = $this->getParameters(array('scheme' => 'unix'));
|
||||
$connection = new StreamConnection($parameters);
|
||||
|
||||
$this->assertInstanceOf('Predis\Connection\NodeConnectionInterface', $connection);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,6 +70,17 @@ class CompositeStreamConnectionTest extends PredisConnectionTestCase
|
||||
new CompositeStreamConnection($parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testExposesParameters()
|
||||
{
|
||||
$parameters = $this->getParameters();
|
||||
$connection = new CompositeStreamConnection($parameters);
|
||||
|
||||
$this->assertSame($parameters, $connection->getParameters());
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user