increase test coverage (#117)

70% test coverage
remove socialite
This commit is contained in:
Saeed Vaziry
2024-03-15 22:23:45 +01:00
committed by GitHub
parent 4f12de9586
commit a406491160
62 changed files with 1102 additions and 639 deletions

View File

@ -4,6 +4,7 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
@ -38,8 +39,12 @@ public static function boot(): void
parent::boot();
static::deleting(function (ServerLog $log) {
if (Storage::disk($log->disk)->exists($log->name)) {
Storage::disk($log->disk)->delete($log->name);
try {
if (Storage::disk($log->disk)->exists($log->name)) {
Storage::disk($log->disk)->delete($log->name);
}
} catch (\Exception $e) {
Log::error($e->getMessage(), ['exception' => $e]);
}
});
}