Beispiel #1
0
 /**
  * @group disconnected
  */
 public function testConnectAndDisconnect()
 {
     $loop = $this->getEventLoop();
     $callback = function ($client, $connection) {
     };
     $connection = $this->getMock('Predis\\Async\\Connection\\ConnectionInterface');
     $connection->expects($this->once())->method('getEventLoop')->will($this->returnValue($loop));
     $connection->expects($this->once())->method('connect')->with($callback);
     $connection->expects($this->once())->method('disconnect');
     $client = new Client($connection, $loop);
     $client->connect($callback);
     $client->disconnect();
 }