Procházet zdrojové kódy

Do not parse response to MOVE into boolean value.

Daniele Alessandri před 9 roky
rodič
revize
e75b69f6fd
2 změnil soubory, kde provedl 3 přidání a 11 odebrání
  1. 0 8
      src/Command/KeyMove.php
  2. 3 3
      tests/Predis/Command/KeyMoveTest.php

+ 0 - 8
src/Command/KeyMove.php

@@ -24,12 +24,4 @@ class KeyMove extends Command
     {
         return 'MOVE';
     }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function parseResponse($data)
-    {
-        return (bool) $data;
-    }
 }

+ 3 - 3
tests/Predis/Command/KeyMoveTest.php

@@ -54,8 +54,8 @@ class KeyMoveTest extends PredisCommandTestCase
     {
         $command = $this->getCommand();
 
-        $this->assertTrue($command->parseResponse(1));
-        $this->assertFalse($command->parseResponse(0));
+        $this->assertSame(0, $command->parseResponse(0));
+        $this->assertSame(1, $command->parseResponse(1));
     }
 
     /**
@@ -69,7 +69,7 @@ class KeyMoveTest extends PredisCommandTestCase
 
         $redis->set('foo', 'bar');
 
-        $this->assertTrue($redis->move('foo', $db));
+        $this->assertSame(1, $redis->move('foo', $db));
         $this->assertSame(0, $redis->exists('foo'));
 
         $redis->select($db);