Skip to content

Commit 1630c06

Browse files
author
Yaroslav Onischenko
authored
Merge pull request #297 from magento-falcons/MAGETWO-57722
[Falcons] Bug fixes
2 parents 27ba478 + 96297ec commit 1630c06

File tree

5 files changed

+67
-13
lines changed

5 files changed

+67
-13
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"ext-mbstring": "*",
6565
"ext-openssl": "*",
6666
"ext-zip": "*",
67+
"ext-pdo_mysql": "*",
6768
"sjparkinson/static-review": "~4.1",
6869
"ramsey/uuid": "3.4"
6970
},

composer.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,19 @@ public function clickBaseImage()
567567
*/
568568
public function closeFullImage()
569569
{
570-
$element = $this->browser->find($this->fullImageClose, Locator::SELECTOR_CSS);
571-
if (!$element->isVisible()) {
572-
$element->hover();
573-
$this->waitForElementVisible($this->fullImageClose);
574-
}
575-
$element->click();
570+
$this->_rootElement->waitUntil(
571+
function () {
572+
$this->browser->find($this->fullImage)->hover();
573+
574+
if ($this->browser->find($this->fullImageClose)->isVisible()) {
575+
$this->browser->find($this->fullImageClose)->click();
576+
577+
return true;
578+
}
579+
580+
return null;
581+
}
582+
);
576583
}
577584

578585
/**

setup/src/Magento/Setup/Model/PhpReadinessCheck.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public function checkPhpSettings()
102102

103103
$settings = array_merge(
104104
$this->checkXDebugNestedLevel(),
105-
$this->checkPopulateRawPostSetting()
105+
$this->checkPopulateRawPostSetting(),
106+
$this->checkFunctionsExistence()
106107
);
107108

108109
foreach ($settings as $setting) {
@@ -316,6 +317,33 @@ private function checkPopulateRawPostSetting()
316317
return $data;
317318
}
318319

320+
/**
321+
* Check whether all special functions exists
322+
*
323+
* @return array
324+
*/
325+
private function checkFunctionsExistence()
326+
{
327+
$data = [];
328+
$requiredFunctions = [
329+
[
330+
'name' => 'imagecreatefromjpeg',
331+
'message' => 'You must have installed GD library with --with-jpeg-dir=DIR option.',
332+
'helpUrl' => 'http://php.net/manual/en/image.installation.php',
333+
],
334+
];
335+
336+
foreach ($requiredFunctions as $function) {
337+
$data['missed_function_' . $function['name']] = [
338+
'message' => $function['message'],
339+
'helpUrl' => $function['helpUrl'],
340+
'error' => !function_exists($function['name']),
341+
];
342+
}
343+
344+
return $data;
345+
}
346+
319347
/**
320348
* Normalize PHP Version
321349
*

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@ public function testCheckPhpSettings()
222222
'message' => $xdebugMessage,
223223
'error' => false,
224224
],
225-
]
225+
'missed_function_imagecreatefromjpeg' => [
226+
'message' => 'You must have installed GD library with --with-jpeg-dir=DIR option.',
227+
'helpUrl' => 'http://php.net/manual/en/image.installation.php',
228+
'error' => false,
229+
],
230+
],
226231
];
227232
if (!$this->isPhp7OrHhvm()) {
228233
$this->setUpNoPrettyVersionParser();
@@ -261,8 +266,13 @@ public function testCheckPhpSettingsFailed()
261266
'xdebug_max_nesting_level' => [
262267
'message' => $xdebugMessage,
263268
'error' => true,
264-
]
265-
]
269+
],
270+
'missed_function_imagecreatefromjpeg' => [
271+
'message' => 'You must have installed GD library with --with-jpeg-dir=DIR option.',
272+
'helpUrl' => 'http://php.net/manual/en/image.installation.php',
273+
'error' => false,
274+
],
275+
],
266276
];
267277
if (!$this->isPhp7OrHhvm()) {
268278
$this->setUpNoPrettyVersionParser();
@@ -301,6 +311,13 @@ public function testCheckPhpSettingsNoXDebug()
301311
]
302312
];
303313
}
314+
315+
$expected['data']['missed_function_imagecreatefromjpeg'] = [
316+
'message' => 'You must have installed GD library with --with-jpeg-dir=DIR option.',
317+
'helpUrl' => 'http://php.net/manual/en/image.installation.php',
318+
'error' => false,
319+
];
320+
304321
$this->assertEquals($expected, $this->phpReadinessCheck->checkPhpSettings());
305322
}
306323

0 commit comments

Comments
 (0)