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>
30 lines
904 B
PHP
30 lines
904 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Enums\FormBuilder;
|
|
|
|
use App\Enums\FormBuilder\FormValueStorageHint;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class FormValueStorageHintTest extends TestCase
|
|
{
|
|
public function test_has_expected_cases(): void
|
|
{
|
|
$this->assertSame('json', FormValueStorageHint::JSON->value);
|
|
$this->assertSame('string', FormValueStorageHint::STRING->value);
|
|
$this->assertSame('number', FormValueStorageHint::NUMBER->value);
|
|
$this->assertSame('date', FormValueStorageHint::DATE->value);
|
|
$this->assertSame('bool', FormValueStorageHint::BOOL->value);
|
|
$this->assertCount(5, FormValueStorageHint::cases());
|
|
}
|
|
|
|
public function test_values_returns_string_array(): void
|
|
{
|
|
$this->assertSame(
|
|
['json', 'string', 'number', 'date', 'bool'],
|
|
FormValueStorageHint::values()
|
|
);
|
|
}
|
|
}
|