Skip to content

Commit 84d2b11

Browse files
committed
test: fix setUp()
1 parent 41fd753 commit 84d2b11

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/system/Database/Live/TransactionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use CodeIgniter\Database\Exceptions\DatabaseException;
1515
use CodeIgniter\Test\CIUnitTestCase;
1616
use CodeIgniter\Test\DatabaseTestTrait;
17+
use Config\Database;
1718
use Tests\Support\Database\Seeds\CITestSeeder;
1819

1920
/**
@@ -28,6 +29,14 @@ final class TransactionTest extends CIUnitTestCase
2829
protected $refresh = true;
2930
protected $seed = CITestSeeder::class;
3031

32+
protected function setUp(): void
33+
{
34+
// Reset connection instance.
35+
$this->db = Database::connect($this->DBGroup, false);
36+
37+
parent::setUp();
38+
}
39+
3140
/**
3241
* Sets $DBDebug to false.
3342
*

0 commit comments

Comments
 (0)