make tests happy

This commit is contained in:
Steven Qiu 2026-03-09 23:13:47 +08:00
parent 9aa867e8aa
commit 840555df42
No known key found for this signature in database
GPG Key ID: 8ACE9DCFC76F38B9

View File

@ -20,6 +20,11 @@ class Option
return;
}
if (!file_exists(storage_path('install.lock')) || app()->runningUnitTests()) {
$this->items = collect();
return;
}
$this->items = DB::table('options')
->get()
->mapWithKeys(fn ($item) => [$item->option_name => $item->option_value]);