Parcourir la source

Test suite: move tests for case-insensitive handling of commands names.

Daniele Alessandri il y a 13 ans
Parent
commit
e070f83dc5
2 fichiers modifiés avec 12 ajouts et 10 suppressions
  1. 12 0
      test/ClientFeaturesTest.php
  2. 0 10
      test/RedisCommandsTest.php

+ 12 - 0
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 */
 

+ 0 - 10
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);
-    }
 }
 ?>