From b96ff262ef14de1fd8a570a2839ce877e6e955a2 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Thu, 24 Nov 2022 13:29:18 +0100 Subject: [PATCH] Update config reverting test --- tests/BootstrapperTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/BootstrapperTest.php b/tests/BootstrapperTest.php index 156d4599..2fee7b7b 100644 --- a/tests/BootstrapperTest.php +++ b/tests/BootstrapperTest.php @@ -350,7 +350,11 @@ test('MailTenancyBootstrapper reverts the config to default when tenancy ends', MailTenancyBootstrapper::$credentialsMap = ['mail.mailers.smtp.password' => 'smtp_password']; config(['mail.mailers.smtp.password' => $defaultPassword = 'no password']); - Tenant::create(['smtp_password' => 'testing password'])->run(fn() => ''); + tenancy()->initialize(Tenant::create(['smtp_password' => $tenantPassword = 'testing password'])); + + expect(config('mail.mailers.smtp.password'))->toBe($tenantPassword); + + tenancy()->end(); expect(config('mail.mailers.smtp.password'))->toBe($defaultPassword); });