Skip to content

Commit 8ee052a

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

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class MaintenanceTest extends \PHPUnit_Framework_TestCase
2626

2727
public function setUp()
2828
{
29+
if (version_compare(PHP_VERSION, '7.0', '>=')) {
30+
$this->markTestSkipped('Skipped for PHP 7');
31+
}
2932
$this->maintenanceMode = $this->getMock('Magento\Framework\App\MaintenanceMode', [], [], '', false);
3033
$this->controller = new Maintenance($this->maintenanceMode);
3134
}

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class PhpReadinessCheckTest extends \PHPUnit_Framework_TestCase
3232

3333
public function setUp()
3434
{
35+
if (version_compare(PHP_VERSION, '7.0', '>=')) {
36+
$this->markTestSkipped('Skipped for PHP 7');
37+
}
3538
$this->composerInfo = $this->getMock('Magento\Framework\Composer\ComposerInformation', [], [], '', false);
3639
$this->phpInfo = $this->getMock('Magento\Setup\Model\PhpInformation', [], [], '', false);
3740
$this->versionParser = $this->getMock('Composer\Package\Version\VersionParser', [], [], '', false);
@@ -216,9 +219,6 @@ public function testCheckPhpSettings()
216219
]
217220
]
218221
];
219-
if (version_compare(PHP_VERSION, '7.0', '>=')) {
220-
unset($expected['data']['always_populate_raw_post_data']);
221-
}
222222
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
223223
}
224224

@@ -257,9 +257,6 @@ public function testCheckPhpSettingsFailed()
257257
]
258258
]
259259
];
260-
if (version_compare(PHP_VERSION, '7.0', '>=')) {
261-
unset($expected['data']['always_populate_raw_post_data']);
262-
}
263260
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
264261
}
265262

@@ -286,9 +283,6 @@ public function testCheckPhpSettingsNoXDebug()
286283
]
287284
]
288285
];
289-
if (version_compare(PHP_VERSION, '7.0', '>=')) {
290-
unset($expected['data']['always_populate_raw_post_data']);
291-
}
292286
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
293287
}
294288

0 commit comments

Comments
 (0)