From 2ae1f79d50bc3ad464dfe04db6f4ed8b946e2083 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 1 May 2026 12:32:03 +0200 Subject: [PATCH] Cover empty string parameters --- tests/TenantDatabaseManagerTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/TenantDatabaseManagerTest.php b/tests/TenantDatabaseManagerTest.php index f28ad8c4..dfceb48a 100644 --- a/tests/TenantDatabaseManagerTest.php +++ b/tests/TenantDatabaseManagerTest.php @@ -622,8 +622,12 @@ test('sqlite database manager validates database filenames', function () { expect(fn () => $manager->databaseExists('valid-db_name.sqlite')) ->not()->toThrow(InvalidArgumentException::class); - // Directories are not allowed as database names - expect(fn () => $manager->databaseExists("..")) + // Directory names are considered invalid input for database names + expect(fn () => $manager->databaseExists('..')) + ->toThrow(InvalidArgumentException::class); + + // Empty strings are considered invalid input for database names + expect(fn () => $manager->databaseExists('')) ->toThrow(InvalidArgumentException::class); // In-memory database names aren't validated