Skip to content

Commit

Permalink
WIP DatabaseTransactionTest
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriBouteille committed Oct 13, 2024
1 parent 7ce1d6b commit 2298bec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/WordPress/Orm/DatabaseTransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public function testBeginTransaction(): void
*/
public function testRollback(): void
{
$this->db->beginTransaction();
$this->assertEquals(1, $this->db->transactionCount);
$this->db->rollBack();
$this->assertLastQueryEquals('ROLLBACK;');
$this->assertEquals(0, $this->db->transactionCount);
Expand All @@ -159,6 +161,8 @@ public function testRollback(): void
*/
public function testCommit(): void
{
$this->db->beginTransaction();
$this->assertEquals(1, $this->db->transactionCount);
$this->db->commit();
$this->assertLastQueryEquals('COMMIT;');
$this->assertEquals(0, $this->db->transactionCount);
Expand Down

0 comments on commit 2298bec

Please sign in to comment.