Skip to content

Commit

Permalink
savepoint support is required in v4 for transaction nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Nov 5, 2024
1 parent f57a8ff commit de96e05
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,24 @@ public function testTransactionIsNotActiveAfterTransactionalInAutoCommitMode():

public function testTransactionIsActiveAfterTransactionalInNoAutoCommitMode(): void
{
$platformMock = $this->createMock(AbstractPlatform::class);
$platformMock
->method('supportsSavepoints')
->willReturn(true);

$driverMock = $this->createMock(Driver::class);
$driverMock
->method('connect')
->willReturn(
self::createStub(DriverConnection::class),
);

$driverMock
->method('getDatabasePlatform')
->willReturn(
$platformMock,
);

$conn = new Connection([], $driverMock);

$conn->setAutoCommit(false);
Expand Down

0 comments on commit de96e05

Please sign in to comment.