From c53c1e59296559b072bc6e71381043410b1bc34c Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 6 Dec 2022 20:13:58 +0900 Subject: [PATCH] test: fix failed tests --- tests/system/Database/Live/TransactionTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/Database/Live/TransactionTest.php b/tests/system/Database/Live/TransactionTest.php index 7dff9eb74329..351acfe5f6a5 100644 --- a/tests/system/Database/Live/TransactionTest.php +++ b/tests/system/Database/Live/TransactionTest.php @@ -11,10 +11,10 @@ namespace CodeIgniter\Database\Live; +use CodeIgniter\Database\Exceptions\DatabaseException; use CodeIgniter\Test\CIUnitTestCase; use CodeIgniter\Test\DatabaseTestTrait; use Config\Database; -use Exception; use Tests\Support\Database\Seeds\CITestSeeder; /** @@ -78,7 +78,7 @@ public function testTransStartDBDebugTrue() $builder->insert($jobData); $this->db->transComplete(); - } catch (Exception $e) { + } catch (DatabaseException $e) { // Do nothing. // MySQLi @@ -99,7 +99,7 @@ public function testTransStartDBDebugTrue() // ErrorException: oci_execute(): ORA-00001: unique constraint (ORACLE.pk_db_job) violated } - $this->assertInstanceOf(Exception::class, $e); + $this->assertInstanceOf(DatabaseException::class, $e); $this->dontSeeInDatabase('job', ['name' => 'Grocery Sales']); }