/** * Commit the active database transaction. * * @return void */ public function commit() { if ($this->transactions == 1) { $this->transaction->commit(); } --$this->transactions; $this->fireConnectionEvent('committed'); }
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()); }