@@ -117,9 +117,8 @@ public function testCheckPhpVersionPrettyVersionFailed()
117
117
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpVersion ());
118
118
}
119
119
120
- public function testCheckPhpVersion ()
120
+ private function setUpNoPrettyVersionParser ()
121
121
{
122
- $ this ->composerInfo ->expects ($ this ->once ())->method ('getRequiredPhpVersion ' )->willReturn ('1.0 ' );
123
122
$ multipleConstraints = $ this ->getMockForAbstractClass (
124
123
'Composer\Package\LinkConstraint\LinkConstraintInterface ' ,
125
124
[],
@@ -136,6 +135,13 @@ public function testCheckPhpVersion()
136
135
);
137
136
$ this ->versionParser ->expects ($ this ->at (2 ))->method ('parseConstraints ' )->willReturn ($ currentPhpVersion );
138
137
$ multipleConstraints ->expects ($ this ->once ())->method ('matches ' )->willReturn (true );
138
+ }
139
+
140
+ public function testCheckPhpVersion ()
141
+ {
142
+ $ this ->composerInfo ->expects ($ this ->once ())->method ('getRequiredPhpVersion ' )->willReturn ('1.0 ' );
143
+
144
+ $ this ->setUpNoPrettyVersionParser ();
139
145
$ expected = [
140
146
'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ,
141
147
'data ' => [
@@ -186,6 +192,8 @@ public function testCheckPhpSettings()
186
192
100 ,
187
193
50
188
194
);
195
+
196
+ $ this ->setUpNoPrettyVersionParser ();
189
197
$ rawPostMessage = sprintf (
190
198
'Your PHP Version is %s, but always_populate_raw_post_data = -1.
191
199
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
@@ -222,6 +230,8 @@ public function testCheckPhpSettingsFailed()
222
230
100 ,
223
231
200
224
232
);
233
+
234
+ $ this ->setUpNoPrettyVersionParser ();
225
235
$ rawPostMessage = sprintf (
226
236
'Your PHP Version is %s, but always_populate_raw_post_data = -1.
227
237
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
@@ -250,6 +260,8 @@ public function testCheckPhpSettingsFailed()
250
260
public function testCheckPhpSettingsNoXDebug ()
251
261
{
252
262
$ this ->phpInfo ->expects ($ this ->once ())->method ('getCurrent ' )->willReturn ([]);
263
+
264
+ $ this ->setUpNoPrettyVersionParser ();
253
265
$ rawPostMessage = sprintf (
254
266
'Your PHP Version is %s, but always_populate_raw_post_data = -1.
255
267
$HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
0 commit comments