aggregate() 공개 메소드

public aggregate ( Predis\Connection\AggregateConnectionInterface $connection, array $parameters )
$connection Predis\Connection\AggregateConnectionInterface
$parameters array
예제 #1
0
 /**
  * @group disconnected
  */
 public function testConstructorWithReplicationArgument()
 {
     $replication = new Connection\Aggregate\MasterSlaveReplication();
     $factory = new Connection\Factory();
     $factory->aggregate($replication, array('tcp://host1?alias=master', 'tcp://host2?alias=slave'));
     $client = new Client($replication);
     $this->assertInstanceOf('Predis\\Connection\\Aggregate\\ReplicationInterface', $client->getConnection());
     $this->assertSame($replication, $client->getConnection());
 }