From 9c9a3d09fc678f4226251b7f0db6bf15dd6baf5a Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Tue, 20 Sep 2022 11:22:23 +0500 Subject: [PATCH] custom path --- tests/TenantDatabaseManagerTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/TenantDatabaseManagerTest.php b/tests/TenantDatabaseManagerTest.php index d2a7582f..32e33c03 100644 --- a/tests/TenantDatabaseManagerTest.php +++ b/tests/TenantDatabaseManagerTest.php @@ -230,7 +230,12 @@ test('path used by sqlite manager can be customized', function () { })->toListener()); // Set custom path for SQLite file - SQLiteDatabaseManager::$path = $customPath = storage_path(); + SQLiteDatabaseManager::$path = $customPath = database_path('custom'); + + if (! is_dir($customPath)) { + // Create custom directory + mkdir($customPath); + } $name = Str::random(8). '.sqlite'; Tenant::create([