<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Tests\Unit\Entities\Zaznam\Enums;

use Seka\Portal\Modul\Statistiky\Tests\TestCase;
use Seka\Portal\Modul\Statistiky\Entities\Zaznam\Enums\StavEmisnejKontrolyEnum;

/**
 * Class StavEmisnejKontrolyEnumTest
 *
 * @package Seka\Portal\Modul\Statistiky\Tests\Unit\Entities\Zaznam\Enums
 */
class StavEmisnejKontrolyEnumTest extends TestCase
{
    /**
     *
     */
    public function testPRIJEM()
    {
        $this->testing('PRIJEM');
    }

    /**
     *
     */
    public function testPREVZATIE()
    {
        $this->testing('PREVZATIE');
    }

    /**
     *
     */
    public function testMERANIE()
    {
        $this->testing('MERANIE');
    }

    /**
     *
     */
    public function testUZAVRETIE()
    {
        $this->testing('UZAVRETIE');
    }

    /**
     *
     */
    public function testARCHIV()
    {
        $this->testing('ARCHIV');
    }

    /**
     *
     */
    public function testSTORNO()
    {
        $this->testing('STORNO');
    }

    /**
     *
     */
    public function testPocetDruhovZaznamu()
    {
        self::assertCount(6, StavEmisnejKontrolyEnum::toValues());
    }

    /**
     * @param string $value
     */
    private function testing(string $value)
    {
        self::assertStringEndsWith($value, StavEmisnejKontrolyEnum::$value()->value);
        self::assertStringStartsWith($value, StavEmisnejKontrolyEnum::$value()->value);
        self::assertTrue(StavEmisnejKontrolyEnum::$value()->equals(StavEmisnejKontrolyEnum::make($value)));
    }
}
