@@ -56,23 +56,23 @@ public function testGetFqsenAndGetName(): void
56
56
{
57
57
$ property = new Property ($ this ->fqsen );
58
58
59
- $ this -> assertSame ($ this ->fqsen , $ property ->getFqsen ());
60
- $ this -> assertEquals ($ this ->fqsen ->getName (), $ property ->getName ());
59
+ self :: assertSame ($ this ->fqsen , $ property ->getFqsen ());
60
+ self :: assertEquals ($ this ->fqsen ->getName (), $ property ->getName ());
61
61
}
62
62
63
63
public function testGettingWhetherPropertyIsStatic (): void
64
64
{
65
65
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null , false );
66
- $ this -> assertFalse ($ property ->isStatic ());
66
+ self :: assertFalse ($ property ->isStatic ());
67
67
68
68
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null , true );
69
- $ this -> assertTrue ($ property ->isStatic ());
69
+ self :: assertTrue ($ property ->isStatic ());
70
70
}
71
71
72
72
public function testGettingWhetherPropertyIsReadOnly (): void
73
73
{
74
74
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null );
75
- $ this -> assertFalse ($ property ->isReadOnly ());
75
+ self :: assertFalse ($ property ->isReadOnly ());
76
76
77
77
$ property = new Property (
78
78
$ this ->fqsen ,
@@ -86,38 +86,40 @@ public function testGettingWhetherPropertyIsReadOnly(): void
86
86
true ,
87
87
);
88
88
89
- $ this -> assertTrue ($ property ->isReadOnly ());
89
+ self :: assertTrue ($ property ->isReadOnly ());
90
90
}
91
91
92
92
public function testGettingVisibility (): void
93
93
{
94
94
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null , true );
95
95
96
- $ this -> assertSame ($ this ->visibility , $ property ->getVisibility ());
96
+ self :: assertSame ($ this ->visibility , $ property ->getVisibility ());
97
97
}
98
98
99
99
public function testSetAndGetTypes (): void
100
100
{
101
101
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null , true );
102
- $ this -> assertEquals ([], $ property ->getTypes ());
102
+ self :: assertEquals ([], $ property ->getTypes ());
103
103
104
104
$ property ->addType ('a ' );
105
- $ this -> assertEquals (['a ' ], $ property ->getTypes ());
105
+ self :: assertEquals (['a ' ], $ property ->getTypes ());
106
106
}
107
107
108
108
public function testGetDefault (): void
109
109
{
110
110
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null , false );
111
- $ this -> assertNull ($ property ->getDefault ());
111
+ self :: assertNull ($ property ->getDefault ());
112
112
113
- $ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , 'a ' , true );
114
- $ this ->assertEquals ('a ' , $ property ->getDefault ());
113
+ $ expression = new Expression ('a ' );
114
+ $ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , $ expression , true );
115
+ self ::assertSame ('a ' , $ property ->getDefault ());
116
+ self ::assertSame ($ expression , $ property ->getDefault (false ));
115
117
}
116
118
117
119
public function testGetDocBlock (): void
118
120
{
119
121
$ property = new Property ($ this ->fqsen , $ this ->visibility , $ this ->docBlock , null , false );
120
- $ this -> assertSame ($ this ->docBlock , $ property ->getDocBlock ());
122
+ self :: assertSame ($ this ->docBlock , $ property ->getDocBlock ());
121
123
}
122
124
123
125
public function testLineAndColumnNumberIsReturnedWhenALocationIsProvided (): void
@@ -140,9 +142,9 @@ public function testGetType(): void
140
142
$ type ,
141
143
);
142
144
143
- $ this -> assertSame ($ type , $ fixture ->getType ());
145
+ self :: assertSame ($ type , $ fixture ->getType ());
144
146
145
147
$ fixture = new Property ($ this ->fqsen );
146
- $ this -> assertNull ($ fixture ->getType ());
148
+ self :: assertNull ($ fixture ->getType ());
147
149
}
148
150
}
0 commit comments