Fix tests.

This commit is contained in:
Raza Mehdi
2020-08-15 01:14:13 +05:00
parent 882d59001f
commit 5edf443141
189 changed files with 1272 additions and 2034 deletions
+9 -6
View File
@@ -131,31 +131,34 @@ class StringBitOpTest extends PredisCommandTestCase
/**
* @group connected
* @expectedException \Predis\Response\ServerException
* @expectedExceptionMessage ERR BITOP NOT must be called with a single source key.
*/
public function testBitwiseNOTAcceptsOnlyOneSourceKey()
{
$this->expectException('Predis\Response\ServerException');
$this->expectExceptionMessage('ERR BITOP NOT must be called with a single source key');
$this->getClient()->bitop('NOT', 'key:dst', 'key:src:1', 'key:src:2');
}
/**
* @group connected
* @expectedException \Predis\Response\ServerException
* @expectedExceptionMessage ERR syntax error
*/
public function testThrowsExceptionOnInvalidOperation()
{
$this->expectException('Predis\Response\ServerException');
$this->expectExceptionMessage('ERR syntax error');
$this->getClient()->bitop('NOOP', 'key:dst', 'key:src:1', 'key:src:2');
}
/**
* @group connected
* @expectedException \Predis\Response\ServerException
* @expectedExceptionMessage Operation against a key holding the wrong kind of value
*/
public function testThrowsExceptionOnInvalidSourceKey()
{
$this->expectException('Predis\Response\ServerException');
$this->expectExceptionMessage('Operation against a key holding the wrong kind of value');
$redis = $this->getClient();
$redis->lpush('key:src:1', 'list');