24 lines
605 B
PHP
24 lines
605 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Console;
|
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
use Tests\TestCase;
|
|
|
|
class HelpSyncCommandTest extends TestCase
|
|
{
|
|
public function test_it_builds_help_cache(): void
|
|
{
|
|
Storage::fake('local');
|
|
|
|
$this->artisan('help:sync')->assertExitCode(0);
|
|
|
|
Storage::disk('local')->assertExists('help/guest/en/articles.json');
|
|
|
|
$payload = json_decode(Storage::disk('local')->get('help/guest/en/articles.json'), true);
|
|
|
|
$this->assertNotEmpty($payload);
|
|
$this->assertContains('getting-started', array_column($payload, 'slug'));
|
|
}
|
|
}
|