@@ -86,7 +86,8 @@ public static function resolveDataProvider(): iterable
8686 yield [Type::array (Type::template ('TValue ' , Type::mixed ()), Type::template ('TKey ' , Type::union (Type::int (), Type::string ()))), 'array<TKey, TValue> ' , $ typeContextFactory ->createFromClassName (DummyCollection::class)];
8787 yield [Type::array (Type::template ('TValue ' , Type::mixed ()), Type::arrayKey ()), 'array<array-key, TValue> ' , $ typeContextFactory ->createFromClassName (DummyCollection::class)];
8888 yield [Type::array (Type::bool (), Type::union (Type::template ('TFoo ' , Type::int ()), Type::template ('TBar ' , Type::string ()))), 'array<TFoo|TBar, bool> ' , $ typeContextFactory ->createFromClassName ($ dummyTemplateKeyUnion ::class)];
89- yield [Type::array (Type::bool (), Type::arrayKey ()), 'array< ' .DummyWithConstants::class.'::DUMMY_STRING_A| ' .DummyWithConstants::class.'::DUMMY_INT_A, bool> ' , $ typeContextFactory ->createFromClassName (DummyWithConstants::class)];
89+ // explicitly test both with fully qualified class name and with imported short class name
90+ yield [Type::array (Type::bool (), Type::arrayKey ()), 'array< \\' .DummyWithConstants::class.'::DUMMY_STRING_A|DummyWithConstants::DUMMY_INT_A, bool> ' , $ typeContextFactory ->createFromClassName (DummyWithConstants::class)];
9091
9192 // list
9293 yield [Type::list (Type::bool ()), 'list<bool> ' ];
@@ -119,6 +120,7 @@ public static function resolveDataProvider(): iterable
119120 // const fetch
120121 yield [Type::string (), DummyWithConstants::class.'::DUMMY_STRING_* ' ];
121122 yield [Type::string (), DummyWithConstants::class.'::DUMMY_STRING_A ' ];
123+ yield [Type::string (), 'DummyWithConstants::DUMMY_STRING_A ' , $ typeContextFactory ->createFromClassName (DummyWithConstants::class)];
122124 yield [Type::int (), DummyWithConstants::class.'::DUMMY_INT_* ' ];
123125 yield [Type::int (), DummyWithConstants::class.'::DUMMY_INT_A ' ];
124126 yield [Type::float (), DummyWithConstants::class.'::DUMMY_FLOAT_* ' ];
0 commit comments