Skip to content

Commit

Permalink
Additional unit test for HMGET
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia committed Jul 30, 2014
1 parent 9f52785 commit 825490f
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions tests/units/RedisMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -1035,13 +1035,26 @@ public function testHSetHMSetHGetHDelHExistsHGetAll()
->isEqualTo(1);
sleep(2);
$this->assert
->array($redisMock->hgetall('test'))
->isEmpty()
->string($redisMock->hmset('test', array(
'test1' => 'somthing',
'raoul' => 'nothing',
)))
->array($redisMock->hmget('test', array('raoul', 'test1')))
->isEqualTo(array(
'raoul' => null,
'test1' => null,
'raoul' => 'nothing',
'test1' => 'somthing',
))
->array($redisMock->hgetall('test'))
->isEmpty();
->integer($redisMock->expire('test', 1))
->isEqualTo(1);
sleep(2);
$this->assert
->array($redisMock->hmget('test', array('raoul', 'test1')))
->isEqualTo(array(
'raoul' => null,
'test1' => null,
));
}

public function testLPushRPushLRemLTrim()
Expand Down

0 comments on commit 825490f

Please sign in to comment.