mirror of
https://github.com/predis/predis.git
synced 2026-08-28 11:09:49 +00:00
Fix tests.
This commit is contained in:
@@ -83,31 +83,34 @@ class StringPreciseSetExpireTest extends PredisCommandTestCase
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @expectedException \Predis\Response\ServerException
|
||||
* @expectedExceptionMessage ERR value is not an integer or out of range
|
||||
*/
|
||||
public function testThrowsExceptionOnNonIntegerTTL()
|
||||
{
|
||||
$this->expectException('Predis\Response\ServerException');
|
||||
$this->expectExceptionMessage('ERR value is not an integer or out of range');
|
||||
|
||||
$this->getClient()->psetex('foo', 2.5, 'bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @expectedException \Predis\Response\ServerException
|
||||
* @expectedExceptionMessage ERR invalid expire time
|
||||
*/
|
||||
public function testThrowsExceptionOnZeroTTL()
|
||||
{
|
||||
$this->expectException('Predis\Response\ServerException');
|
||||
$this->expectExceptionMessage('ERR invalid expire time');
|
||||
|
||||
$this->getClient()->psetex('foo', 0, 'bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @group connected
|
||||
* @expectedException \Predis\Response\ServerException
|
||||
* @expectedExceptionMessage ERR invalid expire time
|
||||
*/
|
||||
public function testThrowsExceptionOnNegativeTTL()
|
||||
{
|
||||
$this->expectException('Predis\Response\ServerException');
|
||||
$this->expectExceptionMessage('ERR invalid expire time');
|
||||
|
||||
$this->getClient()->psetex('foo', -10000, 'bar');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user