From 587f347b6495c1251f93ebd6f0a522358c614575 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 4 May 2026 15:19:12 +0200 Subject: [PATCH] Restore default charset after assertion --- tests/TenantDatabaseManagerTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/TenantDatabaseManagerTest.php b/tests/TenantDatabaseManagerTest.php index 8a591928..09d04815 100644 --- a/tests/TenantDatabaseManagerTest.php +++ b/tests/TenantDatabaseManagerTest.php @@ -581,6 +581,10 @@ test('database managers validate parameters that cannot be bound', function ($dr expect(fn () => $manager->createDatabase($tenantWithNonStringCharset)) ->toThrow(InvalidArgumentException::class, 'Parameter has to be a string.'); + + // Restore the default charset to avoid inconsistencies in future test runs + config(['database.connections.mysql.charset' => 'utf8mb4']); + DB::purge('mysql'); } } else { // Invalid username, createUser() and deleteUser() should