|
@@ -52,7 +52,7 @@ class ListTrimTest extends PredisCommandTestCase
|
|
|
*/
|
|
|
public function testParseResponse()
|
|
|
{
|
|
|
- $this->assertTrue($this->getCommand()->parseResponse(true));
|
|
|
+ $this->assertSame('OK', $this->getCommand()->parseResponse('OK'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -64,13 +64,13 @@ class ListTrimTest extends PredisCommandTestCase
|
|
|
|
|
|
$redis->rpush('letters', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'l');
|
|
|
|
|
|
- $this->assertTrue($redis->ltrim('letters', 0, 2));
|
|
|
+ $this->assertEquals('OK', $redis->ltrim('letters', 0, 2));
|
|
|
$this->assertSame(array('a', 'b', 'c'), $redis->lrange('letters', 0, -1));
|
|
|
|
|
|
$redis->flushdb();
|
|
|
$redis->rpush('letters', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'l');
|
|
|
|
|
|
- $this->assertTrue($redis->ltrim('letters', 5, 9));
|
|
|
+ $this->assertEquals('OK', $redis->ltrim('letters', 5, 9));
|
|
|
$this->assertSame(array('f', 'g', 'h', 'i', 'l'), $redis->lrange('letters', 0, -1));
|
|
|
}
|
|
|
|
|
@@ -83,7 +83,7 @@ class ListTrimTest extends PredisCommandTestCase
|
|
|
|
|
|
$redis->rpush('letters', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'l');
|
|
|
|
|
|
- $this->assertTrue($redis->ltrim('letters', 0, -6));
|
|
|
+ $this->assertEquals('OK', $redis->ltrim('letters', 0, -6));
|
|
|
$this->assertSame(array('a', 'b', 'c', 'd', 'e'), $redis->lrange('letters', 0, -1));
|
|
|
}
|
|
|
|
|
@@ -96,7 +96,7 @@ class ListTrimTest extends PredisCommandTestCase
|
|
|
|
|
|
$redis->rpush('letters', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'l');
|
|
|
|
|
|
- $this->assertTrue($redis->ltrim('letters', -5, -5));
|
|
|
+ $this->assertEquals('OK', $redis->ltrim('letters', -5, -5));
|
|
|
$this->assertSame(array('f'), $redis->lrange('letters', 0, -1));
|
|
|
}
|
|
|
|
|
@@ -109,7 +109,7 @@ class ListTrimTest extends PredisCommandTestCase
|
|
|
|
|
|
$redis->rpush('letters', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'l');
|
|
|
|
|
|
- $this->assertTrue($redis->ltrim('letters', -100, 100));
|
|
|
+ $this->assertEquals('OK', $redis->ltrim('letters', -100, 100));
|
|
|
$this->assertSame(array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'l'), $redis->lrange('letters', -100, 100));
|
|
|
}
|
|
|
|