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

Cover empty string parameters

This commit is contained in:
lukinovec 2026-05-01 12:32:03 +02:00
parent 0ce3d863ce
commit 2ae1f79d50

View file

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