3
3
namespace PHPStan \Reflection \Nette ;
4
4
5
5
use Nette \Utils \Html ;
6
- use PHPStan \Broker \ Broker ;
6
+ use PHPStan \Reflection \ ReflectionProvider ;
7
7
use PHPStan \Testing \PHPStanTestCase ;
8
8
use PHPStan \Type \VerbosityLevel ;
9
9
use stdClass ;
10
10
11
11
class HtmlClassReflectionExtensionTest extends PHPStanTestCase
12
12
{
13
13
14
- private Broker $ broker ;
14
+ private ReflectionProvider $ reflectionProvider ;
15
15
16
16
private HtmlClassReflectionExtension $ extension ;
17
17
18
18
protected function setUp (): void
19
19
{
20
- $ this ->broker = $ this ->createBroker ();
20
+ $ this ->reflectionProvider = $ this ->createReflectionProvider ();
21
21
$ this ->extension = new HtmlClassReflectionExtension ();
22
22
}
23
23
@@ -43,13 +43,13 @@ public function dataHasMethod(): array
43
43
*/
44
44
public function testHasMethod (string $ className , bool $ result ): void
45
45
{
46
- $ classReflection = $ this ->broker ->getClass ($ className );
46
+ $ classReflection = $ this ->reflectionProvider ->getClass ($ className );
47
47
self ::assertSame ($ result , $ this ->extension ->hasMethod ($ classReflection , 'href ' ));
48
48
}
49
49
50
50
public function testGetMethod (): void
51
51
{
52
- $ classReflection = $ this ->broker ->getClass (Html::class);
52
+ $ classReflection = $ this ->reflectionProvider ->getClass (Html::class);
53
53
$ methodReflection = $ this ->extension ->getMethod ($ classReflection , 'href ' );
54
54
$ parametersAcceptor = $ methodReflection ->getVariants ()[0 ];
55
55
self ::assertSame ('href ' , $ methodReflection ->getName ());
@@ -84,13 +84,13 @@ public function dataHasProperty(): array
84
84
*/
85
85
public function testHasProperty (string $ className , bool $ result ): void
86
86
{
87
- $ classReflection = $ this ->broker ->getClass ($ className );
87
+ $ classReflection = $ this ->reflectionProvider ->getClass ($ className );
88
88
self ::assertSame ($ result , $ this ->extension ->hasProperty ($ classReflection , 'href ' ));
89
89
}
90
90
91
91
public function testGetProperty (): void
92
92
{
93
- $ classReflection = $ this ->broker ->getClass (Html::class);
93
+ $ classReflection = $ this ->reflectionProvider ->getClass (Html::class);
94
94
$ propertyReflection = $ this ->extension ->getProperty ($ classReflection , 'href ' );
95
95
self ::assertSame ($ classReflection , $ propertyReflection ->getDeclaringClass ());
96
96
self ::assertFalse ($ propertyReflection ->isStatic ());
0 commit comments