Files
crewli/api/tests/Unit/Enums/FormBuilder/FormFieldDisplayWidthTest.php
bert.hausmans 135bdb352c feat(forms): add PHP enums for form builder
9 backed string enums covering purpose, field type, submission status/mode/review,
field width, value storage hint, snapshot mode, webhook delivery status.
FormPurpose/FormFieldType include helper methods per ARCH §3/§5. All with
declare(strict_types=1) and values() helpers for validation rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 11:27:01 +02:00

24 lines
635 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Enums\FormBuilder;
use App\Enums\FormBuilder\FormFieldDisplayWidth;
use PHPUnit\Framework\TestCase;
class FormFieldDisplayWidthTest extends TestCase
{
public function test_has_half_and_full_cases(): void
{
$this->assertSame('half', FormFieldDisplayWidth::HALF->value);
$this->assertSame('full', FormFieldDisplayWidth::FULL->value);
$this->assertCount(2, FormFieldDisplayWidth::cases());
}
public function test_values_returns_string_array(): void
{
$this->assertSame(['half', 'full'], FormFieldDisplayWidth::values());
}
}