mediaSyncService = self::mock(MediaSyncService::class); } public function testSaveSettings(): void { $this->mediaSyncService->shouldReceive('sync')->once(); $user = User::factory()->admin()->create(); $this->putAsUser('/api/settings', ['media_path' => __DIR__], $user); self::assertEquals(__DIR__, Setting::get('media_path')); } }