<?php

namespace Tests\Unit;

use App\Enums\CurrencyMinorUnit;
use PHPUnit\Framework\TestCase;

class CurrencyMinorUnitTest extends TestCase
{
    public function testResolvesKnownCurrencyCodesToMinorUnitSymbol(): void
    {
        $this->assertEquals('p', CurrencyMinorUnit::symbolForCode('GBP'));
        $this->assertEquals('c', CurrencyMinorUnit::symbolForCode('EUR'));
    }

    public function testReturnsNullForUnknownOrMissingCode(): void
    {
        $this->assertNull(CurrencyMinorUnit::symbolForCode(null));
        $this->assertNull(CurrencyMinorUnit::symbolForCode(''));
        $this->assertNull(CurrencyMinorUnit::symbolForCode('USD'));
    }
}
