Skip to content

Commit

Permalink
test: fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Dec 6, 2022
1 parent d995c54 commit c53c1e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/system/Database/Live/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -78,7 +78,7 @@ public function testTransStartDBDebugTrue()
$builder->insert($jobData);

$this->db->transComplete();
} catch (Exception $e) {
} catch (DatabaseException $e) {
// Do nothing.

// MySQLi
Expand All @@ -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']);
}

Expand Down

0 comments on commit c53c1e5

Please sign in to comment.