77use PHPUnit \Framework \Attributes \CoversClass ;
88use PHPUnit \Framework \Attributes \CoversFunction ;
99use PHPUnit \Framework \Attributes \DataProvider ;
10- use PHPUnit \Framework \Attributes \DoesNotPerformAssertions ;
1110use PHPUnit \Framework \TestCase ;
1211use Typhoon \Type ;
1312use Typhoon \Type \Visitor \Fallback ;
1413use Typhoon \Type \Visitor \Stringify ;
1514use Typhoon \Type \Visitor \WeakVisitor ;
1615
1716#[CoversClass(Stringify::class)]
18- #[CoversFunction('Typhoon\Type\intT ' )]
19- #[CoversFunction('Typhoon\Type\intRangeT ' )]
20- #[CoversFunction('Typhoon\Type\bitmaskT ' )]
21- #[CoversFunction('Typhoon\Type\intMaskT ' )]
22- #[CoversFunction('Typhoon\Type\floatT ' )]
23- #[CoversFunction('Typhoon\Type\floatRangeT ' )]
24- #[CoversFunction('Typhoon\Type\stringT ' )]
25- #[CoversFunction('Typhoon\Type\classT ' )]
26- #[CoversFunction('Typhoon\Type\optional ' )]
27- #[CoversFunction('Typhoon\Type\listT ' )]
28- #[CoversFunction('Typhoon\Type\nonEmptyListT ' )]
29- #[CoversFunction('Typhoon\Type\listShapeT ' )]
30- #[CoversFunction('Typhoon\Type\unsealedListShapeT ' )]
31- #[CoversFunction('Typhoon\Type\arrayT ' )]
32- #[CoversFunction('Typhoon\Type\nonEmptyArrayT ' )]
33- #[CoversFunction('Typhoon\Type\arrayShapeT ' )]
34- #[CoversFunction('Typhoon\Type\unsealedArrayShapeT ' )]
35- #[CoversFunction('Typhoon\Type\iterableT ' )]
36- #[CoversFunction('Typhoon\Type\objectT ' )]
37- #[CoversFunction('Typhoon\Type\objectShapeT ' )]
38- #[CoversFunction('Typhoon\Type\namedObjectT ' )]
39- #[CoversFunction('Typhoon\Type\callableT ' )]
40- #[CoversFunction('Typhoon\Type\closureT ' )]
41- #[CoversFunction('Typhoon\Type\param ' )]
42- #[CoversFunction('Typhoon\Type\constantT ' )]
43- #[CoversFunction('Typhoon\Type\constantMaskT ' )]
44- #[CoversFunction('Typhoon\Type\classConstantT ' )]
45- #[CoversFunction('Typhoon\Type\classConstantMaskT ' )]
46- #[CoversFunction('Typhoon\Type\aliasT ' )]
47- #[CoversFunction('Typhoon\Type\intersectionT ' )]
48- #[CoversFunction('Typhoon\Type\andT ' )]
49- #[CoversFunction('Typhoon\Type\unionT ' )]
50- #[CoversFunction('Typhoon\Type\orT ' )]
51- #[CoversFunction('Typhoon\Type\nullOrT ' )]
5217#[CoversFunction('Typhoon\Type\stringify ' )]
5318final class StringifyTest extends TestCase
5419{
@@ -189,12 +154,6 @@ public static function provideCases(): iterable
189154 yield [classConstantMaskT (\stdClass::class, 'test_* ' ), 'stdClass::test_* ' ];
190155 }
191156
192- #[DoesNotPerformAssertions]
193- public function testConstructorsCoverage (): void
194- {
195- iterator_to_array (self ::provideCases (), preserve_keys: false );
196- }
197-
198157 public function testItCanBeExtended (): void
199158 {
200159 $ myStringify = new /** @extends Fallback<non-empty-string> */ class extends Fallback {
@@ -216,8 +175,8 @@ protected function fallback(Type $type): string
216175 }
217176 };
218177
219- $ string = listShapeT ([listShapeT ([ intT] )])->accept ($ myStringify );
178+ $ string = listShapeT ([orT ( intT, listT (intT) )])->accept ($ myStringify );
220179
221- self ::assertSame ('list{list{ INT} } ' , $ string );
180+ self ::assertSame ('list{INT| list< INT> } ' , $ string );
222181 }
223182}
0 commit comments