add all controllers logic

This commit is contained in:
root
2026-03-11 17:53:15 -04:00
parent 3e6c577085
commit 2ef71cc92b
421 changed files with 12009 additions and 5211 deletions
@@ -0,0 +1,35 @@
<?php
namespace Tests\Unit\Services\System;
use App\Services\System\CleanupSchedulerService;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
use Tests\TestCase;
class CleanupSchedulerServiceTest extends TestCase
{
public function test_should_run_when_no_cache(): void
{
Cache::forget('last_cleanup_run');
$service = new CleanupSchedulerService();
$this->assertTrue($service->shouldRun('last_cleanup_run', 2));
}
public function test_mark_run_sets_cache(): void
{
$service = new CleanupSchedulerService();
$service->markRun('last_cleanup_run');
$this->assertNotNull(Cache::get('last_cleanup_run'));
}
public function test_run_unverified_cleanup_calls_artisan(): void
{
Artisan::shouldReceive('call')->once()->with('users:delete-unverified');
$service = new CleanupSchedulerService();
$service->runUnverifiedCleanup();
}
}