<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\CoreBundle\Tests\Dto;

use Ferienpass\CoreBundle\Dto\Currency;
use PHPUnit\Framework\TestCase;

final class CurrencyTest extends TestCase
{
    public function testReturnsGivenAmountAndDefaultDivisor(): void
    {
        $c = new Currency(1234);

        $this->assertSame(1234, $c->getAmount());
        $this->assertSame(100, $c->getDivisor());
    }

    public function testCustomDivisorIsRespected(): void
    {
        $c = new Currency(5000, 1000);

        $this->assertSame(5000, $c->getAmount());
        $this->assertSame(1000, $c->getDivisor());
    }
}
