13
13
14
14
namespace phpDocumentor \Reflection ;
15
15
16
- use phpDocumentor \Reflection \PseudoTypes \IntegerRange ;
16
+ use phpDocumentor \Reflection \Types \Array_ ;
17
+ use phpDocumentor \Reflection \Types \ClassString ;
18
+ use phpDocumentor \Reflection \Types \Compound ;
17
19
use phpDocumentor \Reflection \Types \Context ;
20
+ use phpDocumentor \Reflection \Types \Integer ;
18
21
use PHPUnit \Framework \TestCase ;
19
22
20
23
/**
@@ -37,15 +40,15 @@ public function testResolvingClassString(): void
37
40
38
41
$ resolvedType = $ fixture ->resolve ('array<int,class-string<\Foo\Bar>> ' , new Context ('' ));
39
42
40
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ Array_::class, $ resolvedType );
43
+ $ this ->assertInstanceOf (Array_::class, $ resolvedType );
41
44
$ this ->assertSame ('array<int,class-string<\Foo\Bar>> ' , (string ) $ resolvedType );
42
45
43
46
$ keyType = $ resolvedType ->getKeyType ();
44
47
$ valueTpye = $ resolvedType ->getValueType ();
45
48
46
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ Integer::class, $ keyType );
49
+ $ this ->assertInstanceOf (Integer::class, $ keyType );
47
50
48
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ ClassString::class, $ valueTpye );
51
+ $ this ->assertInstanceOf (ClassString::class, $ valueTpye );
49
52
$ this ->assertSame ('Bar ' , $ valueTpye ->getFqsen ()->getName ());
50
53
$ this ->assertSame ('\Foo\Bar ' , $ valueTpye ->getFqsen ()->__toString ());
51
54
}
@@ -64,18 +67,17 @@ public function testResolvingClassStrings(): void
64
67
65
68
$ resolvedType = $ fixture ->resolve ('array<int,class-string<\Foo\Bar|\Foo\Lall>> ' , new Context ('' ));
66
69
67
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ Array_::class, $ resolvedType );
70
+ $ this ->assertInstanceOf (Array_::class, $ resolvedType );
68
71
$ this ->assertSame ('array<int,class-string<\Foo\Bar|\Foo\Lall>> ' , (string ) $ resolvedType );
69
72
70
73
$ keyType = $ resolvedType ->getKeyType ();
71
74
$ valueTpye = $ resolvedType ->getValueType ();
72
75
73
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ Integer::class, $ keyType );
76
+ $ this ->assertInstanceOf (Integer::class, $ keyType );
74
77
75
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ Compound::class, $ valueTpye );
78
+ $ this ->assertInstanceOf (Compound::class, $ valueTpye );
76
79
foreach ($ valueTpye ->getIterator () as $ type ) {
77
- $ this ->assertInstanceOf (\ phpDocumentor \ Reflection \ Types \ ClassString::class, $ type );
80
+ $ this ->assertInstanceOf (ClassString::class, $ type );
78
81
}
79
82
}
80
-
81
83
}
0 commit comments