Skip to content

Commit c63ad5d

Browse files
committed
fix fix
1 parent 7138ff9 commit c63ad5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/Persistence/Sql/WithDb/SelectTest.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ public function testExecuteException(): void
250250
if ($this->getDatabasePlatform() instanceof MySQLPlatform) {
251251
$expectedErrorCode = 1146; // SQLSTATE[42S02]: Base table or view not found: 1146 Table 'non_existing_table' doesn't exist
252252

253-
if (Connection::isComposerDbal2x() && !$this->c->expr()->hasNativeNamedParamSupport()) {
254-
$this->markTestIncomplete('DBAL 2.x does not set exception code when mysqli is used');
253+
$dummyExpr = $this->c->expr();
254+
if (Connection::isComposerDbal2x() && !\Closure::bind(fn () => $dummyExpr->hasNativeNamedParamSupport(), null, \Atk4\Data\Persistence\Sql\Expression::class)()) {
255+
$this->markTestIncomplete('DBAL 2.x with mysqli driver does not set exception code');
255256
}
256257
} elseif ($this->getDatabasePlatform() instanceof PostgreSQLPlatform) {
257258
$expectedErrorCode = 7; // SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "non_existing_table" does not exist

0 commit comments

Comments
 (0)