<?php

declare(strict_types=1);

namespace App\Tests\Unit\Audit;

use App\Domain\Audit\AuditAction;
use PHPUnit\Framework\TestCase;

final class AuditActionTest extends TestCase
{
    public function testEntityTypeBeforeDot(): void
    {
        self::assertSame('reporter', AuditAction::entityTypeFor(AuditAction::REPORTER_CREATED));
        self::assertSame('manual_block', AuditAction::entityTypeFor(AuditAction::MANUAL_BLOCK_CREATED));
        self::assertSame('job', AuditAction::entityTypeFor(AuditAction::JOB_TRIGGERED));
        self::assertSame('oidc_role_mapping', AuditAction::entityTypeFor(AuditAction::OIDC_ROLE_MAPPING_DELETED));
    }

    public function testEntityTypeForNoDotReturnsInput(): void
    {
        self::assertSame('foo', AuditAction::entityTypeFor('foo'));
    }
}
