Skip to content

Commit 7aae9e8

Browse files
committed
test(Database): make MySQLi test assertion database-name resilient in ExecuteLogMessageFormatTest
1 parent 639fdee commit 7aae9e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tests/system/Database/Live/ExecuteLogMessageFormatTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testLogMessageWhenExecuteFailsShowFullStructuredBacktrace(): voi
4747
$db->query($sql, [3, 'live', 'Rick']);
4848

4949
$pattern = match ($db->DBDriver) {
50-
'MySQLi' => '/Table \'test\.some_table\' doesn\'t exist/',
50+
'MySQLi' => '/Table \'' . preg_quote($db->database, '/') . '\.some_table\' doesn\'t exist/',
5151
'Postgre' => '/pg_query\(\): Query failed: ERROR: relation "some_table" does not exist/',
5252
'SQLite3' => '/Unable to prepare statement:\s(\d+,\s)?no such table: some_table/',
5353
'OCI8' => '/oci_execute\(\): ORA-00942: table or view "ORACLE"\."SOME_TABLE" does not exist/',

0 commit comments

Comments
 (0)