Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Commit

Permalink
I
Browse files Browse the repository at this point in the history
  • Loading branch information
mondrake committed Aug 31, 2023
1 parent fc6d55f commit 6bc0d00
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/src/Kernel/mysqli/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,23 @@ public function testConnectionDeprecations(): void {
$this->markTestSkipped('Skipping this for mysqli');
}

/**
* Tests starting a transaction when there's one active on the client.
*/
public function testStartTransactionWhenActive(): void {
$this->connection->getClientConnection()->begin_transaction();
$this->connection->startTransaction();
}

/**
* Tests committing a transaction when there's none active on the client.
*/
public function testStartTransactionWhenActive(): void {
$transaction = $this->connection->startTransaction();
$this->assertTrue($this->connection->inTransaction());
$this->connection->getClientConnection()->commit();
$transaction = NULL;
$this->assertFalse($this->connection->inTransaction());
}

}

0 comments on commit 6bc0d00

Please sign in to comment.