1717use PHPUnit \Framework \Attributes \DataProvider ;
1818use PHPUnit \Framework \TestCase ;
1919
20- #[CoversClass(RegexpField ::class)]
21- final class RegexpFieldTest extends TestCase
20+ #[CoversClass(StructuredStringField ::class)]
21+ final class StructuredStringFieldTest extends TestCase
2222{
2323 // --------------------------------------------------------
2424 // Factory constructors
2525 // --------------------------------------------------------
2626
2727 public function testUuidFactoryCreatesValidStrategy (): void
2828 {
29- $ field = RegexpField ::uuid ();
29+ $ field = StructuredStringField ::uuid ();
3030
3131 self ::assertSame (FieldType::StructuredString, $ field ->type ());
3232 self ::assertSame ('uuid ' , $ field ->name ());
@@ -35,21 +35,21 @@ public function testUuidFactoryCreatesValidStrategy(): void
3535
3636 public function testUlidFactoryCreatesValidStrategy (): void
3737 {
38- $ field = RegexpField ::ulid ();
38+ $ field = StructuredStringField ::ulid ();
3939
4040 self ::assertSame ('ulid ' , $ field ->name ());
4141 }
4242
4343 public function testHexColorFactoryCreatesValidStrategy (): void
4444 {
45- $ field = RegexpField ::hexColor ();
45+ $ field = StructuredStringField ::hexColor ();
4646
4747 self ::assertSame ('hex_color ' , $ field ->name ());
4848 }
4949
5050 public function testJwtTokenFactoryCreatesValidStrategy (): void
5151 {
52- $ field = RegexpField ::jwtToken ();
52+ $ field = StructuredStringField ::jwtToken ();
5353
5454 self ::assertSame ('jwt_token ' , $ field ->name ());
5555 }
@@ -81,10 +81,10 @@ public function testParseValidValues(string $input, string $expected): void
8181 {
8282 // NOTE: we test multiple strategies explicitly because pattern differs
8383 $ fields = [
84- RegexpField ::uuid (),
85- RegexpField ::ulid (),
86- RegexpField ::hexColor (),
87- RegexpField ::jwtToken (),
84+ StructuredStringField ::uuid (),
85+ StructuredStringField ::ulid (),
86+ StructuredStringField ::hexColor (),
87+ StructuredStringField ::jwtToken (),
8888 ];
8989
9090 $ matched = false ;
@@ -118,7 +118,7 @@ public static function provideInvalidValues(): array
118118 #[DataProvider('provideInvalidValues ' )]
119119 public function testParseInvalidValues (mixed $ input ): void
120120 {
121- $ field = RegexpField ::uuid ();
121+ $ field = StructuredStringField ::uuid ();
122122
123123 self ::assertNull ($ field ->parse ($ input ));
124124 }
@@ -129,7 +129,7 @@ public function testParseInvalidValues(mixed $input): void
129129
130130 public function testParseTrimsInput (): void
131131 {
132- $ field = RegexpField ::uuid ();
132+ $ field = StructuredStringField ::uuid ();
133133
134134 $ value = ' 550e8400-e29b-41d4-a716-446655440000 ' ;
135135
@@ -145,7 +145,7 @@ public function testParseTrimsInput(): void
145145
146146 public function testTypeMatchesDefinition (): void
147147 {
148- $ field = RegexpField ::hexColor ();
148+ $ field = StructuredStringField ::hexColor ();
149149
150150 self ::assertSame (FieldType::StructuredString, $ field ->type ());
151151 }
0 commit comments