@@ -47,14 +47,14 @@ private function getMockTerminal(int $colours = 8) : MockObject
47
47
->getMock ();
48
48
49
49
$ terminal
50
- ->expects (static ::any ())
50
+ ->expects (self ::any ())
51
51
->method ('getWidth ' )
52
- ->will (static ::returnValue (500 ));
52
+ ->will (self ::returnValue (500 ));
53
53
54
54
$ terminal
55
- ->expects (static ::any ())
55
+ ->expects (self ::any ())
56
56
->method ('getColourSupport ' )
57
- ->will (static ::returnValue ($ colours ));
57
+ ->will (self ::returnValue ($ colours ));
58
58
59
59
return $ terminal ;
60
60
}
@@ -65,54 +65,54 @@ public function testMenuStyleCanBeInstantiatedByCliMenuBuilder() : void
65
65
$ menu = $ builder ->build ();
66
66
67
67
$ reflectionMenu = new \ReflectionObject ($ menu );
68
- static ::assertTrue ($ reflectionMenu ->hasProperty ('style ' ));
68
+ self ::assertTrue ($ reflectionMenu ->hasProperty ('style ' ));
69
69
70
70
$ styleProperty = $ reflectionMenu ->getProperty ('style ' );
71
71
$ styleProperty ->setAccessible (true );
72
72
$ style = $ styleProperty ->getValue ($ menu );
73
73
74
- static ::assertSame (MenuStyle::class, get_class ($ style ));
74
+ self ::assertSame (MenuStyle::class, get_class ($ style ));
75
75
}
76
76
77
77
public function testGetColoursSetCode () : void
78
78
{
79
- static ::assertSame ("\e[37;44m " , $ this ->getMenuStyle ()->getColoursSetCode ());
79
+ self ::assertSame ("\e[37;44m " , $ this ->getMenuStyle ()->getColoursSetCode ());
80
80
}
81
81
82
82
public function testGetColoursResetCode () : void
83
83
{
84
- static ::assertSame ("\e[0m " , $ this ->getMenuStyle ()->getColoursResetCode ());
84
+ self ::assertSame ("\e[0m " , $ this ->getMenuStyle ()->getColoursResetCode ());
85
85
}
86
86
87
87
public function testGetInvertedColoursSetCode () : void
88
88
{
89
- static ::assertSame ("\e[7m " , $ this ->getMenuStyle ()->getInvertedColoursSetCode ());
89
+ self ::assertSame ("\e[7m " , $ this ->getMenuStyle ()->getInvertedColoursSetCode ());
90
90
}
91
91
92
92
public function testGetInvertedColoursUnsetCode () : void
93
93
{
94
- static ::assertSame ("\e[27m " , $ this ->getMenuStyle ()->getInvertedColoursUnsetCode ());
94
+ self ::assertSame ("\e[27m " , $ this ->getMenuStyle ()->getInvertedColoursUnsetCode ());
95
95
}
96
96
97
97
public function testGetterAndSetters () : void
98
98
{
99
99
$ style = $ this ->getMenuStyle ();
100
100
101
- static ::assertSame ('blue ' , $ style ->getBg ());
102
- static ::assertSame ('white ' , $ style ->getFg ());
103
- static ::assertSame ('○ ' , $ style ->getUnselectedMarker ());
104
- static ::assertSame ('● ' , $ style ->getSelectedMarker ());
105
- static ::assertSame ('✔ ' , $ style ->getItemExtra ());
106
- static ::assertFalse ($ style ->getDisplaysExtra ());
107
- static ::assertSame ('= ' , $ style ->getTitleSeparator ());
108
- static ::assertSame (100 , $ style ->getWidth ());
109
- static ::assertSame (2 , $ style ->getMargin ());
110
- static ::assertSame (2 , $ style ->getPadding ());
111
- static ::assertSame (0 , $ style ->getBorderTopWidth ());
112
- static ::assertSame (0 , $ style ->getBorderRightWidth ());
113
- static ::assertSame (0 , $ style ->getBorderBottomWidth ());
114
- static ::assertSame (0 , $ style ->getBorderLeftWidth ());
115
- static ::assertSame ('white ' , $ style ->getBorderColour ());
101
+ self ::assertSame ('blue ' , $ style ->getBg ());
102
+ self ::assertSame ('white ' , $ style ->getFg ());
103
+ self ::assertSame ('○ ' , $ style ->getUnselectedMarker ());
104
+ self ::assertSame ('● ' , $ style ->getSelectedMarker ());
105
+ self ::assertSame ('✔ ' , $ style ->getItemExtra ());
106
+ self ::assertFalse ($ style ->getDisplaysExtra ());
107
+ self ::assertSame ('= ' , $ style ->getTitleSeparator ());
108
+ self ::assertSame (100 , $ style ->getWidth ());
109
+ self ::assertSame (2 , $ style ->getMargin ());
110
+ self ::assertSame (2 , $ style ->getPadding ());
111
+ self ::assertSame (0 , $ style ->getBorderTopWidth ());
112
+ self ::assertSame (0 , $ style ->getBorderRightWidth ());
113
+ self ::assertSame (0 , $ style ->getBorderBottomWidth ());
114
+ self ::assertSame (0 , $ style ->getBorderLeftWidth ());
115
+ self ::assertSame ('white ' , $ style ->getBorderColour ());
116
116
117
117
$ style ->setBg ('red ' );
118
118
$ style ->setFg ('yellow ' );
@@ -130,80 +130,80 @@ public function testGetterAndSetters() : void
130
130
$ style ->setBorderLeftWidth (4 );
131
131
$ style ->setBorderColour ('green ' );
132
132
133
- static ::assertSame ('red ' , $ style ->getBg ());
134
- static ::assertSame ('yellow ' , $ style ->getFg ());
135
- static ::assertSame ('- ' , $ style ->getUnselectedMarker ());
136
- static ::assertSame ('> ' , $ style ->getSelectedMarker ());
137
- static ::assertSame ('EXTRA! ' , $ style ->getItemExtra ());
138
- static ::assertTrue ($ style ->getDisplaysExtra ());
139
- static ::assertSame ('+ ' , $ style ->getTitleSeparator ());
140
- static ::assertSame (200 , $ style ->getWidth ());
141
- static ::assertSame (10 , $ style ->getMargin ());
142
- static ::assertSame (10 , $ style ->getPadding ());
143
- static ::assertSame (1 , $ style ->getBorderTopWidth ());
144
- static ::assertSame (2 , $ style ->getBorderRightWidth ());
145
- static ::assertSame (3 , $ style ->getBorderBottomWidth ());
146
- static ::assertSame (4 , $ style ->getBorderLeftWidth ());
147
- static ::assertSame ('green ' , $ style ->getBorderColour ());
133
+ self ::assertSame ('red ' , $ style ->getBg ());
134
+ self ::assertSame ('yellow ' , $ style ->getFg ());
135
+ self ::assertSame ('- ' , $ style ->getUnselectedMarker ());
136
+ self ::assertSame ('> ' , $ style ->getSelectedMarker ());
137
+ self ::assertSame ('EXTRA! ' , $ style ->getItemExtra ());
138
+ self ::assertTrue ($ style ->getDisplaysExtra ());
139
+ self ::assertSame ('+ ' , $ style ->getTitleSeparator ());
140
+ self ::assertSame (200 , $ style ->getWidth ());
141
+ self ::assertSame (10 , $ style ->getMargin ());
142
+ self ::assertSame (10 , $ style ->getPadding ());
143
+ self ::assertSame (1 , $ style ->getBorderTopWidth ());
144
+ self ::assertSame (2 , $ style ->getBorderRightWidth ());
145
+ self ::assertSame (3 , $ style ->getBorderBottomWidth ());
146
+ self ::assertSame (4 , $ style ->getBorderLeftWidth ());
147
+ self ::assertSame ('green ' , $ style ->getBorderColour ());
148
148
}
149
149
150
150
public function testSetBorderShorthandFunction () : void
151
151
{
152
152
$ style = $ this ->getMenuStyle ();
153
153
$ style ->setBorder (3 );
154
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
155
- static ::assertSame (3 , $ style ->getBorderRightWidth ());
156
- static ::assertSame (3 , $ style ->getBorderBottomWidth ());
157
- static ::assertSame (3 , $ style ->getBorderLeftWidth ());
158
- static ::assertSame ('white ' , $ style ->getBorderColour ());
154
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
155
+ self ::assertSame (3 , $ style ->getBorderRightWidth ());
156
+ self ::assertSame (3 , $ style ->getBorderBottomWidth ());
157
+ self ::assertSame (3 , $ style ->getBorderLeftWidth ());
158
+ self ::assertSame ('white ' , $ style ->getBorderColour ());
159
159
160
160
$ style = $ this ->getMenuStyle ();
161
161
$ style ->setBorder (3 , 4 );
162
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
163
- static ::assertSame (4 , $ style ->getBorderRightWidth ());
164
- static ::assertSame (3 , $ style ->getBorderBottomWidth ());
165
- static ::assertSame (4 , $ style ->getBorderLeftWidth ());
166
- static ::assertSame ('white ' , $ style ->getBorderColour ());
162
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
163
+ self ::assertSame (4 , $ style ->getBorderRightWidth ());
164
+ self ::assertSame (3 , $ style ->getBorderBottomWidth ());
165
+ self ::assertSame (4 , $ style ->getBorderLeftWidth ());
166
+ self ::assertSame ('white ' , $ style ->getBorderColour ());
167
167
168
168
$ style = $ this ->getMenuStyle ();
169
169
$ style ->setBorder (3 , 4 , 5 );
170
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
171
- static ::assertSame (4 , $ style ->getBorderRightWidth ());
172
- static ::assertSame (5 , $ style ->getBorderBottomWidth ());
173
- static ::assertSame (4 , $ style ->getBorderLeftWidth ());
174
- static ::assertSame ('white ' , $ style ->getBorderColour ());
170
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
171
+ self ::assertSame (4 , $ style ->getBorderRightWidth ());
172
+ self ::assertSame (5 , $ style ->getBorderBottomWidth ());
173
+ self ::assertSame (4 , $ style ->getBorderLeftWidth ());
174
+ self ::assertSame ('white ' , $ style ->getBorderColour ());
175
175
176
176
$ style = $ this ->getMenuStyle ();
177
177
$ style ->setBorder (3 , 4 , 5 , 6 );
178
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
179
- static ::assertSame (4 , $ style ->getBorderRightWidth ());
180
- static ::assertSame (5 , $ style ->getBorderBottomWidth ());
181
- static ::assertSame (6 , $ style ->getBorderLeftWidth ());
182
- static ::assertSame ('white ' , $ style ->getBorderColour ());
178
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
179
+ self ::assertSame (4 , $ style ->getBorderRightWidth ());
180
+ self ::assertSame (5 , $ style ->getBorderBottomWidth ());
181
+ self ::assertSame (6 , $ style ->getBorderLeftWidth ());
182
+ self ::assertSame ('white ' , $ style ->getBorderColour ());
183
183
184
184
$ style = $ this ->getMenuStyle ();
185
185
$ style ->setBorder (3 , 4 , 5 , 6 , 'red ' );
186
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
187
- static ::assertSame (4 , $ style ->getBorderRightWidth ());
188
- static ::assertSame (5 , $ style ->getBorderBottomWidth ());
189
- static ::assertSame (6 , $ style ->getBorderLeftWidth ());
190
- static ::assertSame ('red ' , $ style ->getBorderColour ());
186
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
187
+ self ::assertSame (4 , $ style ->getBorderRightWidth ());
188
+ self ::assertSame (5 , $ style ->getBorderBottomWidth ());
189
+ self ::assertSame (6 , $ style ->getBorderLeftWidth ());
190
+ self ::assertSame ('red ' , $ style ->getBorderColour ());
191
191
192
192
$ style = $ this ->getMenuStyle ();
193
193
$ style ->setBorder (3 , 4 , 5 , 'red ' );
194
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
195
- static ::assertSame (4 , $ style ->getBorderRightWidth ());
196
- static ::assertSame (5 , $ style ->getBorderBottomWidth ());
197
- static ::assertSame (4 , $ style ->getBorderLeftWidth ());
198
- static ::assertSame ('red ' , $ style ->getBorderColour ());
194
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
195
+ self ::assertSame (4 , $ style ->getBorderRightWidth ());
196
+ self ::assertSame (5 , $ style ->getBorderBottomWidth ());
197
+ self ::assertSame (4 , $ style ->getBorderLeftWidth ());
198
+ self ::assertSame ('red ' , $ style ->getBorderColour ());
199
199
200
200
$ style = $ this ->getMenuStyle ();
201
201
$ style ->setBorder (3 , 4 , 'red ' );
202
- static ::assertSame (3 , $ style ->getBorderTopWidth ());
203
- static ::assertSame (4 , $ style ->getBorderRightWidth ());
204
- static ::assertSame (3 , $ style ->getBorderBottomWidth ());
205
- static ::assertSame (4 , $ style ->getBorderLeftWidth ());
206
- static ::assertSame ('red ' , $ style ->getBorderColour ());
202
+ self ::assertSame (3 , $ style ->getBorderTopWidth ());
203
+ self ::assertSame (4 , $ style ->getBorderRightWidth ());
204
+ self ::assertSame (3 , $ style ->getBorderBottomWidth ());
205
+ self ::assertSame (4 , $ style ->getBorderLeftWidth ());
206
+ self ::assertSame ('red ' , $ style ->getBorderColour ());
207
207
208
208
$ style = $ this ->getMenuStyle ();
209
209
$ style ->setBorder (3 , 'red ' );
0 commit comments