Эх сурвалжийг харах

Minor code rearrangements.

Daniele Alessandri 15 жил өмнө
parent
commit
9ac0d26a48
1 өөрчлөгдсөн 14 нэмэгдсэн , 15 устгасан
  1. 14 15
      test/RedisCommandsTest.php

+ 14 - 15
test/RedisCommandsTest.php

@@ -65,21 +65,6 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         });
     }
 
-    function testAppend() {
-        $this->redis->set('foo', 'bar');
-        $this->assertEquals(5, $this->redis->append('foo', '__'));
-        $this->assertEquals(8, $this->redis->append('foo', 'bar'));
-        $this->assertEquals('bar__bar', $this->redis->get('foo'));
-
-        $this->assertEquals(4, $this->redis->append('hoge', 'piyo'));
-        $this->assertEquals('piyo', $this->redis->get('hoge'));
-
-        RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
-            $test->redis->pushTail('metavars', 'foo');
-            $test->redis->append('metavars', 'bar');
-        });
-    }
-
     /* commands operating on string values */
 
     function testSet() {
@@ -205,6 +190,20 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase {
         $this->assertEquals('zset', $this->redis->type('fooZSet'));
     }
 
+    function testAppend() {
+        $this->redis->set('foo', 'bar');
+        $this->assertEquals(5, $this->redis->append('foo', '__'));
+        $this->assertEquals(8, $this->redis->append('foo', 'bar'));
+        $this->assertEquals('bar__bar', $this->redis->get('foo'));
+
+        $this->assertEquals(4, $this->redis->append('hoge', 'piyo'));
+        $this->assertEquals('piyo', $this->redis->get('hoge'));
+
+        RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) {
+            $test->redis->pushTail('metavars', 'foo');
+            $test->redis->append('metavars', 'bar');
+        });
+    }
 
     /* commands operating on the key space */