<?php

declare(strict_types=1);

namespace Tests\Unit\Framework\Development\HotReload;

use App\Framework\Development\HotReload\FileChangeType;

describe('FileChangeType', function () {
    it('has CREATED change type', function () {
        expect(FileChangeType::CREATED->value)->toBe('created');
    });

    it('has MODIFIED change type', function () {
        expect(FileChangeType::MODIFIED->value)->toBe('modified');
    });

    it('has DELETED change type', function () {
        expect(FileChangeType::DELETED->value)->toBe('deleted');
    });

    it('has RENAMED change type', function () {
        expect(FileChangeType::RENAMED->value)->toBe('renamed');
    });

    it('can be created from cases', function () {
        expect(FileChangeType::cases())->toHaveCount(4);
        expect(FileChangeType::cases())->toContain(FileChangeType::CREATED);
        expect(FileChangeType::cases())->toContain(FileChangeType::MODIFIED);
        expect(FileChangeType::cases())->toContain(FileChangeType::DELETED);
        expect(FileChangeType::cases())->toContain(FileChangeType::RENAMED);
    });

    it('can be compared', function () {
        expect(FileChangeType::CREATED)->toBe(FileChangeType::CREATED);
        expect(FileChangeType::MODIFIED)->not->toBe(FileChangeType::CREATED);
    });
});
