Skip to content

Commit beda204

Browse files
mazhalaiOlga Kopylova
authored andcommitted
MAGETWO-44929: [PHP7] Unit tests PHPReadinessCheck and Maintenance fail on bamboo
- fixing test for php7
1 parent d65806f commit beda204

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

setup/src/Magento/Setup/Test/Unit/Controller/MaintenanceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MaintenanceTest extends \PHPUnit_Framework_TestCase
2020
/**
2121
* Controller
2222
*
23-
* @var \Magento\Setup\Controller\CompleteBackup
23+
* @var \Magento\Setup\Controller\Maintenance
2424
*/
2525
private $controller;
2626

setup/src/Magento/Setup/Test/Unit/Model/PhpReadinessCheckTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ public function testCheckPhpSettings()
216216
]
217217
]
218218
];
219+
if (version_compare(PHP_VERSION, '7.0', '>=')) {
220+
unset($expected['data']['always_populate_raw_post_data']);
221+
}
219222
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
220223
}
221224

@@ -254,6 +257,9 @@ public function testCheckPhpSettingsFailed()
254257
]
255258
]
256259
];
260+
if (version_compare(PHP_VERSION, '7.0', '>=')) {
261+
unset($expected['data']['always_populate_raw_post_data']);
262+
}
257263
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
258264
}
259265

@@ -280,6 +286,9 @@ public function testCheckPhpSettingsNoXDebug()
280286
]
281287
]
282288
];
289+
if (version_compare(PHP_VERSION, '7.0', '>=')) {
290+
unset($expected['data']['always_populate_raw_post_data']);
291+
}
283292
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
284293
}
285294

0 commit comments

Comments
 (0)