@@ -209,13 +209,15 @@ public function testCheckPhpSettings()
209
209
'message ' => $ xdebugMessage ,
210
210
'error ' => false ,
211
211
],
212
- 'always_populate_raw_post_data ' => [
213
- 'message ' => $ rawPostMessage ,
214
- 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
215
- 'error ' => false
216
- ]
217
212
]
218
213
];
214
+ if (!$ this ->isPhp7OrHackLang ()) {
215
+ $ expected ['data ' ]['always_populate_raw_post_data ' ] = [
216
+ 'message ' => $ rawPostMessage ,
217
+ 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
218
+ 'error ' => false
219
+ ];
220
+ }
219
221
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
220
222
}
221
223
@@ -246,14 +248,16 @@ public function testCheckPhpSettingsFailed()
246
248
'xdebug_max_nesting_level ' => [
247
249
'message ' => $ xdebugMessage ,
248
250
'error ' => true ,
249
- ],
250
- 'always_populate_raw_post_data ' => [
251
- 'message ' => $ rawPostMessage ,
252
- 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
253
- 'error ' => false
254
251
]
255
252
]
256
253
];
254
+ if (!$ this ->isPhp7OrHackLang ()) {
255
+ $ expected ['data ' ]['always_populate_raw_post_data ' ] = [
256
+ 'message ' => $ rawPostMessage ,
257
+ 'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
258
+ 'error ' => false
259
+ ];
260
+ }
257
261
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
258
262
}
259
263
@@ -272,14 +276,17 @@ public function testCheckPhpSettingsNoXDebug()
272
276
);
273
277
$ expected = [
274
278
'responseType ' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS ,
275
- 'data ' => [
279
+ 'data ' => []
280
+ ];
281
+ if (!$ this ->isPhp7OrHackLang ()) {
282
+ $ expected ['data ' ] = [
276
283
'always_populate_raw_post_data ' => [
277
284
'message ' => $ rawPostMessage ,
278
285
'helpUrl ' => 'http://php.net/manual/en/ini.core.php#ini.always-populate-settings-data ' ,
279
286
'error ' => false
280
287
]
281
- ]
282
- ];
288
+ ];
289
+ }
283
290
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpSettings ());
284
291
}
285
292
@@ -333,6 +340,14 @@ public function testCheckPhpExtensionsFailed()
333
340
];
334
341
$ this ->assertEquals ($ expected , $ this ->phpReadinessCheck ->checkPhpExtensions ());
335
342
}
343
+
344
+ /**
345
+ * @return bool
346
+ */
347
+ protected function isPhp7OrHackLang ()
348
+ {
349
+ return version_compare (PHP_VERSION , '7.0.0-beta ' ) >= 0 || defined ('HHVM_VERSION ' );
350
+ }
336
351
}
337
352
338
353
namespace Magento \Setup \Model ;
0 commit comments