From e070f83dc50d0b333a314133e81b9196b56475b8 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Sun, 2 Oct 2011 23:29:03 +0200 Subject: [PATCH] Test suite: move tests for case-insensitive handling of commands names. --- test/ClientFeaturesTest.php | 12 ++++++++++++ test/RedisCommandsTest.php | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/ClientFeaturesTest.php b/test/ClientFeaturesTest.php index fa2976f3..61aec604 100644 --- a/test/ClientFeaturesTest.php +++ b/test/ClientFeaturesTest.php @@ -152,6 +152,18 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase { $this->assertInstanceOf($cmdClass, $profile->createCommand($cmdId)); } + function testServerProfile_CaseInsensitiveCommandsNames() { + $profile = $this->redis->getProfile(); + + $uppercase = $profile->supportsCommand('INFO'); + $lowercase = $profile->supportsCommand('info'); + $this->assertEquals($uppercase, $lowercase); + + $uppercase = $profile->createCommand('INFO'); + $lowercase = $profile->createCommand('info'); + $this->assertEquals($uppercase, $lowercase); + } + /* Predis\ResponseQueued */ diff --git a/test/RedisCommandsTest.php b/test/RedisCommandsTest.php index 93d05188..ec6548da 100644 --- a/test/RedisCommandsTest.php +++ b/test/RedisCommandsTest.php @@ -2075,15 +2075,5 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase { function testLastSave() { $this->assertGreaterThan(0, $this->redis->lastsave()); } - - function testUppercaseCommands() { - $uppercase = $this->redis->getProfile()->supportsCommand('INFO'); - $lowercase = $this->redis->getProfile()->supportsCommand('info'); - $this->assertEquals($uppercase, $lowercase); - - $uppercase = $this->redis->getProfile()->createCommand('INFO'); - $lowercase = $this->redis->getProfile()->createCommand('info'); - $this->assertEquals($uppercase, $lowercase); - } } ?>