@@ -52,7 +52,7 @@ public function testMiddlewareWrapsInTransactionAndFlushes()
     {
         $this->connection->expects($this->exactly(1))
             ->method('getTransactionNestingLevel')
-            ->will($this->onConsecutiveCalls(1, 1, 0))
+            ->will($this->onConsecutiveCalls(0, 1))
         ;
 
         $this->middleware->handle(new Envelope(new \stdClass()), $this->getStackMock());