Skip to content

Commit

Permalink
Skip when no savepoints support
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Oct 4, 2021
1 parent 2055cee commit 82ce962
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/Functional/DeferrableConstraintsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public function testTransactionalWithNonDeferredConstraint(): void

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

$this->skipIfDeferrableIsNotSupported();

$this->connection->setNestTransactionsWithSavepoints(true);
Expand All @@ -112,6 +116,10 @@ public function testTransactionalWithDeferredConstraintAndTransactionNesting():

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

$this->connection->setNestTransactionsWithSavepoints(true);

$this->connection->transactional(function (Connection $connection): void {
Expand Down Expand Up @@ -158,6 +166,10 @@ public function testInsertWithNonDeferredConstraint(): void

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

$this->skipIfDeferrableIsNotSupported();

$this->connection->setNestTransactionsWithSavepoints(true);
Expand All @@ -175,6 +187,10 @@ public function testCommitWithDeferredConstraintAndTransactionNesting(): void

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

$this->skipIfDeferrableIsNotSupported();

$this->connection->setNestTransactionsWithSavepoints(true);
Expand Down

0 comments on commit 82ce962

Please sign in to comment.