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>
29 lines
905 B
PHP
29 lines
905 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Enums\FormBuilder;
|
|
|
|
use App\Enums\FormBuilder\FormWebhookDeliveryStatus;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class FormWebhookDeliveryStatusTest extends TestCase
|
|
{
|
|
public function test_has_expected_cases(): void
|
|
{
|
|
$this->assertSame('pending', FormWebhookDeliveryStatus::PENDING->value);
|
|
$this->assertSame('delivered', FormWebhookDeliveryStatus::DELIVERED->value);
|
|
$this->assertSame('failed', FormWebhookDeliveryStatus::FAILED->value);
|
|
$this->assertSame('dead_letter', FormWebhookDeliveryStatus::DEAD_LETTER->value);
|
|
$this->assertCount(4, FormWebhookDeliveryStatus::cases());
|
|
}
|
|
|
|
public function test_values_returns_string_array(): void
|
|
{
|
|
$this->assertSame(
|
|
['pending', 'delivered', 'failed', 'dead_letter'],
|
|
FormWebhookDeliveryStatus::values()
|
|
);
|
|
}
|
|
}
|