$driver === 'mysql' ? '3307' : '3308'; return match ($driver) { 'sqlite' => [ 'driver' => 'pdo_sqlite', 'memory' => true, ], 'postgres' => [ 'driver' => 'pdo_pgsql', 'host' => $isCi ? '127.0.0.1' : 'shlink_db_postgres', 'port' => $isCi ? '5434' : '5432', 'user' => 'postgres', 'password' => 'root', 'dbname' => 'shlink_test', 'charset' => 'utf8', ], 'mssql' => [ 'driver' => 'pdo_sqlsrv', 'host' => $isCi ? '127.0.0.1' : 'shlink_db_ms', 'user' => 'sa', 'password' => 'Passw0rd!', 'dbname' => 'shlink_test', 'driverOptions' => [ 'TrustServerCertificate' => 'true', ], ], default => [ // mysql and maria 'driver' => 'pdo_mysql', 'host' => $isCi ? '127.0.0.1' : sprintf('shlink_db_%s', $driver), 'port' => $isCi ? $getCiMysqlPort($driver) : '3306', 'user' => 'root', 'password' => 'root', 'dbname' => 'shlink_test', 'charset' => 'utf8mb4', ], }; }; $buildTestLoggerConfig = static fn (string $filename) => [ 'level' => Level::Debug->value, 'type' => LoggerType::STREAM->value, 'destination' => sprintf('data/log/api-tests/%s', $filename), 'add_new_line' => true, ]; return [ 'debug' => true, ConfigAggregator::ENABLE_CACHE => false, FastRouteRouter::CONFIG_CACHE_ENABLED => false, 'routes' => [ // This route is used to test that title resolution is skipped if the long URL times out [ 'name' => 'long_url_with_timeout', 'path' => '/api-tests/long-url-with-timeout', 'allowed_methods' => ['GET'], 'middleware' => middleware(static function () { sleep(5); // Title resolution times out at 3 seconds return new HtmlResponse('