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

Improve fluent-interface style for transactions with CAS.

Daniele Alessandri 14 жил өмнө
parent
commit
0bbbe064b5

+ 1 - 0
lib/Predis.php

@@ -903,6 +903,7 @@ class MultiExecBlock {
             return $this;
         }
         $this->initialize();
+        return $this;
     }
 
     public function unwatch() {

+ 1 - 2
test/PredisClientFeatures.php

@@ -701,8 +701,7 @@ class PredisClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
     function testMultiExecBlock_RetryNotAvailableWithoutBlock() {
         $options = array('watch' => 'foo', 'retry' => 1);
         $tx = RC::getConnection()->multiExec($options);
-        $tx->multi();
-        $tx->get('foo')->exec();
+        $tx->multi()->get('foo')->exec();
     }
 
     function testMultiExecBlock_CheckAndSet_Discard() {