public function testCallWillExecuteCommandAndFireEventProperly()
 {
     $predisClient = m::mock(ClientInterface::class);
     $predisClient->shouldReceive('get')->once()->with('foo')->andReturn('bar');
     $event = m::mock(Dispatcher::class);
     $event->shouldReceive('fire')->once();
     $client = new Predis($predisClient, $event);
     $result = $client->get('foo');
     $this->assertSame('bar', $result);
 }
 /**
  * Returns all keys matching pattern.
  *
  * @param $pattern
  */
 public function keys($pattern)
 {
     return $this->client->keys($pattern);
 }