mirror of
https://github.com/predis/predis.git
synced 2026-10-08 04:46:38 +00:00
Tests for Predis\RedisServerProfile.
This commit is contained in:
@@ -108,6 +108,18 @@ class RC {
|
||||
$testcaseInstance->assertEquals($expectedMessage, $thrownException->getMessage());
|
||||
}
|
||||
|
||||
public static function testForClientException($testcaseInstance, $expectedMessage, $wrapFunction) {
|
||||
$thrownException = null;
|
||||
try {
|
||||
$wrapFunction($testcaseInstance);
|
||||
}
|
||||
catch (Predis\ClientException $exception) {
|
||||
$thrownException = $exception;
|
||||
}
|
||||
$testcaseInstance->assertType('Predis\ClientException', $thrownException);
|
||||
$testcaseInstance->assertEquals($expectedMessage, $thrownException->getMessage());
|
||||
}
|
||||
|
||||
public static function pushTailAndReturn(Predis\Client $client, $keyName, Array $values, $wipeOut = 0) {
|
||||
if ($wipeOut == true) {
|
||||
$client->delete($keyName);
|
||||
|
||||
Reference in New Issue
Block a user