23 lines
609 B
PHP
23 lines
609 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Shared\Enums;
|
|
|
|
use Domain\Enums\BarcodeFormat;
|
|
|
|
covers(BarcodeFormat::class);
|
|
|
|
describe('barcode format', function (): void {
|
|
it('has the expected cases with their backing values', function (): void {
|
|
// THEN
|
|
expect(BarcodeFormat::EAN13->value)->toBe("ean")
|
|
->and(BarcodeFormat::CODE128->value)->toBe("code128")
|
|
->and(BarcodeFormat::GS1_128->value)->toBe("gs1");
|
|
});
|
|
|
|
it('exposes its case name', function (): void {
|
|
// THEN
|
|
expect(BarcodeFormat::EAN13->name)->toBe('EAN13');
|
|
});
|
|
});
|