diff --git a/lib/Predis/AbortedMultiExec.php b/lib/Predis/AbortedMultiExec.php deleted file mode 100644 index a7ca31c5..00000000 --- a/lib/Predis/AbortedMultiExec.php +++ /dev/null @@ -1,7 +0,0 @@ -_client->exec(); if ($reply === null) { if ($attemptsLeft === 0) { - throw new AbortedMultiExec( + throw new AbortedMultiExecException( 'The current transaction has been aborted by the server' ); } diff --git a/test/ClientFeaturesTest.php b/test/ClientFeaturesTest.php index 2c9378c7..0cb00312 100644 --- a/test/ClientFeaturesTest.php +++ b/test/ClientFeaturesTest.php @@ -486,14 +486,15 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase { $client->flushdb(); $multi = $client->multiExec(); + $transactionClass = '\Predis\Transaction\MultiExecContext'; - $this->assertInstanceOf('\Predis\MultiExecContext', $multi); - $this->assertInstanceOf('\Predis\MultiExecContext', $multi->set('foo', 'bar')); - $this->assertInstanceOf('\Predis\MultiExecContext', $multi->set('hoge', 'piyo')); - $this->assertInstanceOf('\Predis\MultiExecContext', $multi->mset(array( + $this->assertInstanceOf($transactionClass, $multi); + $this->assertInstanceOf($transactionClass, $multi->set('foo', 'bar')); + $this->assertInstanceOf($transactionClass, $multi->set('hoge', 'piyo')); + $this->assertInstanceOf($transactionClass, $multi->mset(array( 'foofoo' => 'barbar', 'hogehoge' => 'piyopiyo' ))); - $this->assertInstanceOf('\Predis\MultiExecContext', $multi->mget(array( + $this->assertInstanceOf($transactionClass, $multi->mget(array( 'foo', 'hoge', 'foofoo', 'hogehoge' ))); diff --git a/test/PredisShared.php b/test/PredisShared.php index cf6e2247..296d9d62 100644 --- a/test/PredisShared.php +++ b/test/PredisShared.php @@ -168,10 +168,10 @@ class RC { try { $wrapFunction($testcaseInstance); } - catch (Predis\AbortedMultiExec $exception) { + catch (Predis\Transaction\AbortedMultiExecException $exception) { $thrownException = $exception; } - $testcaseInstance->assertInstanceOf('Predis\AbortedMultiExec', $thrownException); + $testcaseInstance->assertInstanceOf('Predis\Transaction\AbortedMultiExecException', $thrownException); } public static function pushTailAndReturn(Predis\Client $client, $keyName, Array $values, $wipeOut = 0) {