コード例 #1
0
 /**
  * Commit the active database transaction.
  *
  * @return void
  */
 public function commit()
 {
     if ($this->transactions == 1) {
         $this->transaction->commit();
     }
     --$this->transactions;
     $this->fireConnectionEvent('committed');
 }
コード例 #2
0
 public function testCommit_NoId_NoopAndMarksTransactionClosed()
 {
     $transaction = new Transaction($this->client);
     $this->client->expects($this->never())->method('addStatementsToTransaction');
     $result = $transaction->commit();
     self::assertSame($transaction, $result);
     self::assertTrue($transaction->isClosed());
 }