File tree Expand file tree Collapse file tree
tests/system/Database/Live Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212namespace CodeIgniter \Database \Live ;
1313
14+ use CodeIgniter \Database \Exceptions \DatabaseException ;
1415use CodeIgniter \Test \CIUnitTestCase ;
1516use CodeIgniter \Test \DatabaseTestTrait ;
1617use Config \Database ;
17- use Exception ;
1818use 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
You can’t perform that action at this time.
0 commit comments