db2 driver updates

This commit is contained in:
Mark Gregory
2026-11-11 10:48:53 +00:00
parent 2e51121c5b
commit d9e83bcbcb
24 changed files with 3750 additions and 15 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace Tests\Feature\Db2;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
abstract class Db2TestCase extends TestCase
{
protected function db()
{
return DB::connection('db2_local');
}
protected function setUp(): void
{
parent::setUp();
if (! extension_loaded('pdo_odbc')) {
$this->markTestSkipped('PDO_ODBC extension unavailable.');
}
if (! config('database.connections.db2_local')) {
$this->markTestSkipped('db2_local is not configured.');
}
try {
$this->db()->select(
'SELECT 1 AS "health" FROM SYSIBM.SYSDUMMY1'
);
} catch (\Throwable $e) {
$this->markTestSkipped(
'Db2 connection unavailable: ' . $e->getMessage()
);
}
}
}