1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 15:24:03 +00:00

Restore default charset after assertion

This commit is contained in:
lukinovec 2026-05-04 15:19:12 +02:00
parent bbd8f6fd98
commit 587f347b64

View file

@ -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