<?php

namespace Tests\Feature\Help;

use App\Services\Help\HelpSyncService;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Storage;
use Tests\TestCase;

class HelpSyncServiceTest extends TestCase
{
    public function test_help_sync_writes_compiled_articles(): void
    {
        Storage::fake('local');
        Config::set('help.disk', 'local');

        $service = $this->app->make(HelpSyncService::class);
        $result = $service->sync();

        $this->assertNotEmpty($result);
        Storage::disk('local')->assertExists('help/guest/en/articles.json');
        Storage::disk('local')->assertExists('help/guest/de/articles.json');
    }
}
