Example #1
0
 public function testHashGet()
 {
     $client = new Client(array('host' => 'localhost'));
     $connection = $client->createConnection();
     $this->assertTrue($connection);
     $client->hSetNx('testkey', 'testhash', 1);
     $result = $client->hGet('testkey', 'testhash');
     $this->assertEquals(1, $result);
     $client->del('testkey');
 }