style(админка): pint — new UseAdminConnection без скобок в тесте
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ it('switches default connection to pgsql_admin during the request', function ()
|
||||
$original = DB::getDefaultConnection();
|
||||
$seen = null;
|
||||
|
||||
$response = (new UseAdminConnection())->handle(
|
||||
$response = (new UseAdminConnection)->handle(
|
||||
Request::create('/api/admin/tenants'),
|
||||
function () use (&$seen) {
|
||||
$seen = DB::getDefaultConnection();
|
||||
@@ -30,7 +30,7 @@ it('switches default connection to pgsql_admin during the request', function ()
|
||||
it('restores the default connection even when downstream throws', function () {
|
||||
$original = DB::getDefaultConnection();
|
||||
|
||||
$call = fn () => (new UseAdminConnection())->handle(
|
||||
$call = fn () => (new UseAdminConnection)->handle(
|
||||
Request::create('/api/admin/tenants'),
|
||||
function () {
|
||||
throw new RuntimeException('boom');
|
||||
|
||||
Reference in New Issue
Block a user