Esempio n. 1
0
 /**
  * Rollback the active database transaction.
  *
  * @return void
  */
 public function rollBack()
 {
     if ($this->transactions == 1) {
         $this->transactions = 0;
         $this->transaction->rollBack();
     } else {
         --$this->transactions;
     }
     $this->fireConnectionEvent('rollingBack');
 }
 public function testKeepAlive_NoTransactionId_Noop()
 {
     $transaction = new Transaction($this->client);
     $this->client->expects($this->never())->method('addStatementsToTransaction');
     $result = $transaction->keepAlive();
     self::assertSame($transaction, $result);
     self::assertFalse($transaction->isClosed());
 }