diff --git a/tests/unit/TypeResolverTest.php b/tests/unit/TypeResolverTest.php index b293c2e..1552640 100644 --- a/tests/unit/TypeResolverTest.php +++ b/tests/unit/TypeResolverTest.php @@ -20,6 +20,7 @@ use phpDocumentor\Reflection\Types\Compound; use phpDocumentor\Reflection\Types\Context; use phpDocumentor\Reflection\Types\Expression; +use phpDocumentor\Reflection\Types\Integer; use phpDocumentor\Reflection\Types\Intersection; use phpDocumentor\Reflection\Types\Iterable_; use phpDocumentor\Reflection\Types\Null_; @@ -756,4 +757,18 @@ public function provideFqcn() : array 'class with emoji' => ['\My😁Class'], ]; } + + /** + * @uses \phpDocumentor\Reflection\Types\Context + * + * @covers ::__construct + * @covers ::resolve + */ + public function testArrayKeyValueSpecification() : void + { + $fixture = new TypeResolver(); + $type = $fixture->resolve('array>', new Context('')); + + $this->assertEquals(new Array_(new Array_(new String_(), new Integer()), new String_()), $type); + } }