From 07584f859c06e749488878bcfa1cf24240ffc3f0 Mon Sep 17 00:00:00 2001 From: Jurian Sluiman Date: Mon, 26 Sep 2011 20:33:45 +0200 Subject: [PATCH] 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. --- test/RedisCommandsTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/RedisCommandsTest.php b/test/RedisCommandsTest.php index ec6548da..7e7e2d4a 100644 --- a/test/RedisCommandsTest.php +++ b/test/RedisCommandsTest.php @@ -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); + } } ?>