mirror of
https://github.com/predis/predis.git
synced 2026-09-18 14:28:54 +00:00
Add methods to test for uppercase and lowercase commands
At this moment predis is only capable of lowercase commands, the test adds the requirement to provide both lowercase, uppercase (and even mixed case) commands.
This commit is contained in:
@@ -2075,5 +2075,19 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
|
||||
function testLastSave() {
|
||||
$this->assertGreaterThan(0, $this->redis->lastsave());
|
||||
}
|
||||
|
||||
function testUppercaseCommands() {
|
||||
$uppercase = $this->redis->INFO();
|
||||
$lowercase = $this->redis->info();
|
||||
$this->assertEquals($uppercase, $lowercase);
|
||||
|
||||
$uppercase = $this->getProfile()->supportsCommand('INFO');
|
||||
$lowercase = $this->getProfile()->supportsCommand('info');
|
||||
$this->assertEquals($uppercase, $lowercase);
|
||||
|
||||
$uppercase = $this->getProfile()->createCommand('INFO');
|
||||
$lowercase = $this->getProfile()->createCommand('info');
|
||||
$this->assertEquals($uppercase, $lowercase);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user