Skip to content

Commit

Permalink
Conditionally skip tests that involve nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed May 17, 2022
1 parent 128b068 commit 78642ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Functional/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public function testCommitWithRollbackOnlyThrowsException(): void

public function testTransactionNestingBehavior(): void
{
if (! $this->connection->getDatabasePlatform()->supportsSavepoints()) {
self::markTestSkipped('This test requires the platform to support savepoints.');
}

$this->createTestTable();

$this->connection->beginTransaction();
Expand Down Expand Up @@ -77,6 +81,10 @@ public function testTransactionNestingBehavior(): void

public function testTransactionNestingLevelIsResetOnReconnect(): void
{
if (! $this->connection->getDatabasePlatform()->supportsSavepoints()) {
self::markTestSkipped('This test requires the platform to support savepoints.');
}

if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
$params = $this->connection->getParams();
$params['memory'] = false;
Expand Down

0 comments on commit 78642ed

Please sign in to comment.