mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 16:24:03 +00:00
Cover empty string parameters
This commit is contained in:
parent
0ce3d863ce
commit
2ae1f79d50
1 changed files with 6 additions and 2 deletions
|
|
@ -622,8 +622,12 @@ test('sqlite database manager validates database filenames', function () {
|
||||||
expect(fn () => $manager->databaseExists('valid-db_name.sqlite'))
|
expect(fn () => $manager->databaseExists('valid-db_name.sqlite'))
|
||||||
->not()->toThrow(InvalidArgumentException::class);
|
->not()->toThrow(InvalidArgumentException::class);
|
||||||
|
|
||||||
// Directories are not allowed as database names
|
// Directory names are considered invalid input for database names
|
||||||
expect(fn () => $manager->databaseExists(".."))
|
expect(fn () => $manager->databaseExists('..'))
|
||||||
|
->toThrow(InvalidArgumentException::class);
|
||||||
|
|
||||||
|
// Empty strings are considered invalid input for database names
|
||||||
|
expect(fn () => $manager->databaseExists(''))
|
||||||
->toThrow(InvalidArgumentException::class);
|
->toThrow(InvalidArgumentException::class);
|
||||||
|
|
||||||
// In-memory database names aren't validated
|
// In-memory database names aren't validated
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue