Skip to content

Commit

Permalink
update tests for dbal connection
Browse files Browse the repository at this point in the history
  • Loading branch information
otazniksk committed Jun 13, 2019
1 parent e6c240b commit 7137460
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testTransactionNestingBehavior() : void
$this->fail('Transaction commit after failed nested transaction should fail.');
} catch (ConnectionException $e) {
self::assertEquals(1, $this->connection->getTransactionNestingLevel());
self::assertTrue($this->connection->rollBack());
$this->connection->rollBack();
self::assertEquals(0, $this->connection->getTransactionNestingLevel());
}
}
Expand Down Expand Up @@ -104,7 +104,7 @@ public function testTransactionNestingBehaviorWithSavepoints() : void
} catch (ConnectionException $e) {
self::assertTrue($this->connection->getNestTransactionsWithSavepoints());
}
self::assertTrue($this->connection->commit()); // should not throw exception
$this->connection->commit(); // should not throw exception
} catch (ConnectionException $e) {
$this->fail('Transaction commit after failed nested transaction should not fail when using savepoints.');
self::assertTrue($this->connection->rollBack());
Expand Down Expand Up @@ -181,7 +181,7 @@ public function testTransactionBehaviorWithRollback() : void
$this->connection->commit(); // never reached
} catch (Throwable $e) {
self::assertEquals(1, $this->connection->getTransactionNestingLevel());
self::assertTrue($this->connection->rollBack());
$this->connection->rollBack();
self::assertEquals(0, $this->connection->getTransactionNestingLevel());
}
}
Expand Down

0 comments on commit 7137460

Please sign in to comment.