<?php
declare(strict_types=1);

namespace FreshCloud\Mail\Tests\MimeEnums;

use FreshCloud\Mail\MimeEnums\ContentType;
use FreshCloud\Mail\MimeEnums\TransferEncoding;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(ContentType::class)]
#[CoversClass(TransferEncoding::class)]
final class MimeEnumsTest extends TestCase
{
    public function testContentTypeValues(): void
    {
        $this->assertSame('text', ContentType::Text->value);
        $this->assertSame('html', ContentType::Html->value);
    }

    public function testTransferEncodingValues(): void
    {
        $this->assertSame('7bit', TransferEncoding::SevenBit->value);
        $this->assertSame('base64', TransferEncoding::Base64->value);
    }

    public function testGetLowercaseMethod(): void
    {
        $this->assertSame('text', ContentType::Text->getLowercase());
        $this->assertSame('quoted-printable', TransferEncoding::QuotedPrintable->getLowercase());
    }

    public function testContentTypeCases(): void
    {
        $cases = ContentType::cases();
        $this->assertCount(8, $cases);
        $this->assertContains(ContentType::Text, $cases);
        $this->assertContains(ContentType::Multipart, $cases);
    }

    public function testTransferEncodingCases(): void
    {
        $cases = TransferEncoding::cases();
        $this->assertCount(5, $cases);
        $this->assertContains(TransferEncoding::Base64, $cases);
        $this->assertContains(TransferEncoding::Binary, $cases);
    }
}