Skip to content

Commit c53c1e5

Browse files
committed
test: fix failed tests
1 parent d995c54 commit c53c1e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/system/Database/Live/TransactionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace CodeIgniter\Database\Live;
1313

14+
use CodeIgniter\Database\Exceptions\DatabaseException;
1415
use CodeIgniter\Test\CIUnitTestCase;
1516
use CodeIgniter\Test\DatabaseTestTrait;
1617
use Config\Database;
17-
use Exception;
1818
use Tests\Support\Database\Seeds\CITestSeeder;
1919

2020
/**
@@ -78,7 +78,7 @@ public function testTransStartDBDebugTrue()
7878
$builder->insert($jobData);
7979

8080
$this->db->transComplete();
81-
} catch (Exception $e) {
81+
} catch (DatabaseException $e) {
8282
// Do nothing.
8383

8484
// MySQLi
@@ -99,7 +99,7 @@ public function testTransStartDBDebugTrue()
9999
// ErrorException: oci_execute(): ORA-00001: unique constraint (ORACLE.pk_db_job) violated
100100
}
101101

102-
$this->assertInstanceOf(Exception::class, $e);
102+
$this->assertInstanceOf(DatabaseException::class, $e);
103103
$this->dontSeeInDatabase('job', ['name' => 'Grocery Sales']);
104104
}
105105

0 commit comments

Comments
 (0)