Pārlūkot izejas kodu

Test suite: move up testStrlen().

Daniele Alessandri 14 gadi atpakaļ
vecāks
revīzija
ecc7499b47
1 mainītis faili ar 12 papildinājumiem un 11 dzēšanām
  1. 12 11
      test/RedisCommandsTest.php

+ 12 - 11
test/RedisCommandsTest.php

@@ -259,6 +259,18 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         });
     }
 
+    function testStrlen() {
+        $this->redis->set('var', 'foobar');
+        $this->assertEquals(6, $this->redis->strlen('var'));
+        $this->assertEquals(9, $this->redis->append('var', '___'));
+        $this->assertEquals(9, $this->redis->strlen('var'));
+
+        RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
+            $test->redis->rpush('metavars', 'foo');
+            $test->redis->strlen('metavars');
+        });
+    }
+
     function testSetBit() {
         $this->assertEquals(0, $this->redis->setbit('binary', 31, 1));
         $this->assertEquals(0, $this->redis->setbit('binary', 0, 1));
@@ -313,17 +325,6 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         });
     }
 
-    function testStrlen() {
-        $this->redis->set('var', 'foobar');
-        $this->assertEquals(6, $this->redis->strlen('var'));
-        $this->assertEquals(9, $this->redis->append('var', '___'));
-        $this->assertEquals(9, $this->redis->strlen('var'));
-
-        RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
-            $test->redis->rpush('metavars', 'foo');
-            $test->redis->strlen('metavars');
-        });
-    }
 
 
     /* commands operating on the key space */