Skip to content

Commit af34872

Browse files
committed
fix
1 parent 21addfd commit af34872

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/system/Database/Live/SclubricantsTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ final class SclubricantsTest extends CIUnitTestCase
4040
protected function setUp(): void
4141
{
4242
parent::setUp();
43+
44+
$this->setupTable();
4345
}
4446

4547
public function setupTable()
4648
{
4749
$this->forge = Database::forge($this->DBGroup);
4850

51+
$this->forge->dropTable('users', true);
52+
4953
$this->forge->addField([
5054
'id' => ['type' => 'INTEGER', 'constraint' => 3, 'auto_increment' => true],
5155
'name' => ['type' => 'VARCHAR', 'constraint' => 80],
@@ -321,6 +325,8 @@ public function testUpdateWithQuery()
321325

322326
public function testUpsertWithQuery()
323327
{
328+
$this->setupTable();
329+
324330
$rawSql = new RawSql('CURRENT_TIMESTAMP');
325331

326332
$updateFields = ['updated_at' => $rawSql];
@@ -345,6 +351,8 @@ public function testUpsertWithQuery()
345351

346352
public function testInsertWithQuery()
347353
{
354+
$this->setupTable();
355+
348356
$subQuery = $this->db->table('users')->select('email, name, country');
349357

350358
$this->db->table('user')->ignore(true)->insertBatch($subQuery);

0 commit comments

Comments
 (0)