<?php

namespace Tests\Feature;

use App\Services\InstallerService;
use Tests\TestCase;

class InstallationTest extends TestCase
{
    public function test_requirements_are_detected(): void
    {
        $check = app(InstallerService::class)->requirements();

        $this->assertArrayHasKey('php_ok', $check);
        $this->assertArrayHasKey('extensions', $check);
        $this->assertTrue(version_compare(PHP_VERSION, '8.2.0', '>='));
        $this->assertArrayHasKey('mbstring', $check['extensions']);
        $this->assertArrayHasKey('pdo', $check['extensions']);
    }
}
