|
@@ -33,5 +33,12 @@ class AppServiceProvider extends ServiceProvider
|
|
|
$this->app->singleton(DingDingRobot::class, function () {
|
|
$this->app->singleton(DingDingRobot::class, function () {
|
|
|
return new DingDingRobot(env('DINGDING_ACCESS_TOKEN'), env('DINGDING_SECRET'));
|
|
return new DingDingRobot(env('DINGDING_ACCESS_TOKEN'), env('DINGDING_SECRET'));
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ // 仅在测试环境使用信任自签名证书的 SQL Server 连接器 (兼容 ODBC Driver 18)
|
|
|
|
|
+ if (env('APP_ENV') === 'testing') {
|
|
|
|
|
+ $this->app->singleton('db.factory', function ($app) {
|
|
|
|
|
+ return new \App\Connectors\TrustConnectionFactory($app);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|