Esempio n. 1
0
 function testConnection_LazyConnect()
 {
     $cmd = Predis_RedisServerProfile::getDefault()->createCommand('ping');
     $connection = new Predis_Connection(RC::getConnectionParameters());
     $this->assertFalse($connection->isConnected());
     $connection->writeCommand($cmd);
     $this->assertTrue($connection->isConnected());
     $this->assertTrue($connection->readResponse($cmd));
 }