mirror of
https://github.com/predis/predis.git
synced 2026-10-06 11:59:30 +00:00
[tests] Fix expected exception message on wrong key type.
Redis >= 2.8 returns -WRONGTYPE errors instead of -ERR when executing operations on wrong key type (such as trying to LPUSH on a string key). Luckily for us, phpunit's @expectedExceptionMessage annotation actually does not perform an exact match but works on a substring so we just omit the initial part of the exception message to make the test work.
This commit is contained in:
@@ -168,7 +168,7 @@ class StringBitOpTest extends CommandTestCase
|
||||
/**
|
||||
* @group connected
|
||||
* @expectedException Predis\ServerException
|
||||
* @expectedExceptionMessage ERR Operation against a key holding the wrong kind of value
|
||||
* @expectedExceptionMessage Operation against a key holding the wrong kind of value
|
||||
*/
|
||||
public function testThrowsExceptionOnInvalidSourceKey()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user