@@ -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,12 +192,14 @@ 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
- $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
199
+ $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
200
+ This will stop the installer from running.
192
201
Please open your php.ini file and set always_populate_raw_post_data to -1.
193
- If you need more help please call your hosting provider.
194
- ' ,
202
+ If you need more help please call your hosting provider. ' ,
195
203
PHP_VERSION
196
204
);
197
205
$ expected = [
@@ -222,12 +230,14 @@ 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
- $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
237
+ $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
238
+ This will stop the installer from running.
228
239
Please open your php.ini file and set always_populate_raw_post_data to -1.
229
- If you need more help please call your hosting provider.
230
- ' ,
240
+ If you need more help please call your hosting provider. ' ,
231
241
PHP_VERSION
232
242
);
233
243
$ expected = [
@@ -250,12 +260,14 @@ 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
- $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will stop the installer from running.
267
+ $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0.
268
+ This will stop the installer from running.
256
269
Please open your php.ini file and set always_populate_raw_post_data to -1.
257
- If you need more help please call your hosting provider.
258
- ' ,
270
+ If you need more help please call your hosting provider. ' ,
259
271
PHP_VERSION
260
272
);
261
273
$ expected = [
0 commit comments