Skip to content

Commit f44c65d

Browse files
author
Korshenko, Olexii(okorshenko)
committed
Merge pull request #132 from magento-ogre/PR_Branch
[Ogres] Bugfixes
2 parents acd35f4 + f9d98f7 commit f44c65d

File tree

79 files changed

+266
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+266
-77
lines changed

app/code/Magento/Backend/App/Area/FrontNameResolver.php

+31-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
namespace Magento\Backend\App\Area;
99

1010
use Magento\Backend\Setup\ConfigOptionsList;
11+
use Magento\Framework\App\Config\ScopeConfigInterface;
1112
use Magento\Framework\App\DeploymentConfig;
13+
use Magento\Store\Model\ScopeInterface;
14+
use Magento\Store\Model\Store;
1215

1316
class FrontNameResolver implements \Magento\Framework\App\Area\FrontNameResolverInterface
1417
{
@@ -38,27 +41,51 @@ class FrontNameResolver implements \Magento\Framework\App\Area\FrontNameResolver
3841
*/
3942
protected $deploymentConfig;
4043

44+
/** @var ScopeConfigInterface */
45+
private $configInterface;
46+
4147
/**
4248
* @param \Magento\Backend\App\Config $config
4349
* @param DeploymentConfig $deploymentConfig
50+
* @param ScopeConfigInterface $configInterface
4451
*/
45-
public function __construct(\Magento\Backend\App\Config $config, DeploymentConfig $deploymentConfig)
46-
{
52+
public function __construct(
53+
\Magento\Backend\App\Config $config,
54+
DeploymentConfig $deploymentConfig,
55+
ScopeConfigInterface $configInterface
56+
) {
4757
$this->config = $config;
4858
$this->defaultFrontName = $deploymentConfig->get(ConfigOptionsList::CONFIG_PATH_BACKEND_FRONTNAME);
59+
$this->configInterface = $configInterface;
4960
}
5061

5162
/**
5263
* Retrieve area front name
5364
*
54-
* @return string
65+
* @param bool $checkHost If true, verify front name is valid for this url (hostname is correct)
66+
* @return string|bool
5567
*/
56-
public function getFrontName()
68+
public function getFrontName($checkHost = false)
5769
{
70+
if ($checkHost && !$this->isHostBackend()) {
71+
return false;
72+
}
5873
$isCustomPathUsed = (bool)(string)$this->config->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_PATH);
5974
if ($isCustomPathUsed) {
6075
return (string)$this->config->getValue(self::XML_PATH_CUSTOM_ADMIN_PATH);
6176
}
6277
return $this->defaultFrontName;
6378
}
79+
80+
/**
81+
* Return whether the host from request is the backend host
82+
* @return bool
83+
*/
84+
public function isHostBackend()
85+
{
86+
$backendUrl = $this->configInterface->getValue(Store::XML_PATH_UNSECURE_BASE_URL, ScopeInterface::SCOPE_STORE);
87+
$backendHost = parse_url(trim($backendUrl), PHP_URL_HOST);
88+
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
89+
return (strcasecmp($backendHost, $host) === 0);
90+
}
6491
}

app/code/Magento/Backend/App/Router/NoRouteHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function process(\Magento\Framework\App\RequestInterface $request)
4242
$requestPathParams = explode('/', trim($request->getPathInfo(), '/'));
4343
$areaFrontName = array_shift($requestPathParams);
4444

45-
if ($areaFrontName == $this->helper->getAreaFrontName()) {
45+
if ($areaFrontName === $this->helper->getAreaFrontName(true)) {
4646
$moduleName = $this->routeConfig->getRouteFrontName('adminhtml');
4747
$actionNamespace = 'noroute';
4848
$actionName = 'index';

app/code/Magento/Backend/Helper/Data.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,11 @@ public function getHomePageUrl()
198198
/**
199199
* Return Backend area front name
200200
*
201-
* @return string
201+
* @param bool $checkHost
202+
* @return bool|string
202203
*/
203-
public function getAreaFrontName()
204+
public function getAreaFrontName($checkHost = false)
204205
{
205-
return $this->_frontNameResolver->getFrontName();
206+
return $this->_frontNameResolver->getFrontName($checkHost);
206207
}
207208
}

app/code/Magento/Backend/Test/Unit/App/Area/FrontNameResolverTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ protected function setUp()
3333
->with(ConfigOptionsList::CONFIG_PATH_BACKEND_FRONTNAME)
3434
->will($this->returnValue($this->_defaultFrontName));
3535
$this->_configMock = $this->getMock('\Magento\Backend\App\Config', [], [], '', false);
36-
$this->_model = new FrontNameResolver($this->_configMock, $deploymentConfigMock);
36+
$configMock = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false);
37+
$this->_model = new FrontNameResolver($this->_configMock, $deploymentConfigMock, $configMock);
3738
}
3839

3940
public function testIfCustomPathUsed()

app/code/Magento/Backend/Test/Unit/Model/Menu/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Backend:etc/menu.xsd');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
1616

1717
protected function setUp()
1818
{
19+
if (!function_exists('libxml_set_external_entity_loader')) {
20+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
21+
}
1922
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2023
$this->_schemaFile = $urnResolver->getRealPath('urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd');
2124
}

app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchemaPath = $urnResolver->getRealPath('urn:magento:module:Magento_Catalog:etc/');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/XsdMergedTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdMergedTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath(
2528
'urn:magento:module:Magento_Catalog:etc/product_types_merged.xsd'

app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Catalog:etc/product_types.xsd');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/Config/Test/Unit/Model/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Config:etc/system.xsd');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config.php renamed to app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Variations/Config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super;
6+
namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations;
77

88
use Magento\Backend\Block\Widget;
99
use Magento\Backend\Block\Widget\Tab\TabInterface;

app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php renamed to app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Variations/Config/Matrix.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Product variations matrix block
99
*/
10-
namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config;
10+
namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config;
1111

1212
use Magento\Catalog\Api\ProductRepositoryInterface;
1313
use Magento\Catalog\Model\Product;
+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\ConfigurableProduct\Test\Unit\Block\Adminhtml\Product\Edit\Tab\Super\Config;
6+
namespace Magento\ConfigurableProduct\Test\Unit\Block\Adminhtml\Product\Edit\Tab\Variations\Config;
77

88
/**
99
* Class MatrixTest
@@ -13,7 +13,7 @@ class MatrixTest extends \PHPUnit_Framework_TestCase
1313
/**
1414
* Object under test
1515
*
16-
* @var \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix
16+
* @var \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix
1717
*/
1818
protected $_block;
1919

@@ -48,7 +48,7 @@ protected function setUp()
4848
$helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
4949
$this->_object = $helper->getObject('Magento\Config\Block\System\Config\Form', $data);
5050
$this->_block = $helper->getObject(
51-
'Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix',
51+
'Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix',
5252
$data
5353
);
5454
}

app/code/Magento/ConfigurableProduct/view/adminhtml/layout/catalog_product_superconfig_config.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
1010
<referenceBlock name="product_tabs">
11-
<block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config" name="admin.product.edit.tab.super.config.grid.container">
12-
<block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix" template="Magento_ConfigurableProduct::catalog/product/edit/super/matrix.phtml" as="matrix">
11+
<block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config" name="admin.product.edit.tab.super.config.grid.container">
12+
<block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix" template="Magento_ConfigurableProduct::catalog/product/edit/super/matrix.phtml" as="matrix">
1313
<block class="Magento\Ui\Block\Component\StepsWizard" name="variation-steps-wizard">
1414
<block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\SelectAttributes" name="step1" template="Magento_ConfigurableProduct::catalog/product/edit/attribute/steps/select_attributes.phtml">
1515
<uiComponent name="product_attributes_listing"/>

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/config.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// @codingStandardsIgnoreFile
88

9-
/** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config */
9+
/** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config */
1010
?>
1111
<div class="entry-edit form-inline" id="<?php /* @escapeNotVerified */ echo $block->getId() ?>" data-panel="product-variations">
1212
<div data-bind="scope: 'variation-steps-wizard'" class="product-create-configuration">

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// @codingStandardsIgnoreFile
88

9-
/** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix */
9+
/** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix */
1010
?>
1111
<?php
1212
$productMatrix = $block->getProductMatrix();

app/code/Magento/Cron/Test/Unit/Model/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
1414

1515
public function setUp()
1616
{
17+
if (!function_exists('libxml_set_external_entity_loader')) {
18+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
19+
}
1720
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
1821
$this->_xsdFile = $urnResolver->getRealPath('urn:magento:module:Magento_Cron:etc/crontab.xsd');
1922
}

app/code/Magento/Customer/Test/Unit/Controller/Adminhtml/Index/ValidateTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ class ValidateTest extends \PHPUnit_Framework_TestCase
6464

6565
public function setUp()
6666
{
67+
if (!function_exists('libxml_set_external_entity_loader')) {
68+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
69+
}
6770
$this->customer = $this->getMockForAbstractClass(
6871
'Magento\Customer\Api\Data\CustomerInterface',
6972
[],

app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
1616

1717
protected function setUp()
1818
{
19+
if (!function_exists('libxml_set_external_entity_loader')) {
20+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
21+
}
1922
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2023
$this->_schemaFile = $urnResolver->getRealPath('urn:magento:module:Magento_Customer:etc/address_formats.xsd');
2124
}

app/code/Magento/Developer/Test/Unit/Console/Command/XmlConverterCommandTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class XmlConverterCommandTest extends \PHPUnit_Framework_TestCase
3636

3737
public function setUp()
3838
{
39+
if (!function_exists('libxml_set_external_entity_loader')) {
40+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
41+
}
3942
$this->formatter = $this->getMock('Magento\Developer\Model\Tools\Formatter', [], [], '', false);
4043
$this->domFactory = $this->getMock('Magento\Framework\DomDocument\DomDocumentFactory', [], [], '', false);
4144
$this->xsltProcessorFactory = $this->getMock(

app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Eav:etc/eav_attributes.xsd');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2121
*/
2222
public function testMergedXml($fixtureXml, array $expectedErrors)
2323
{
24+
if (!function_exists('libxml_set_external_entity_loader')) {
25+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
26+
}
2427
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2528
$schemaFile = $urnResolver->getRealPath('urn:magento:module:Magento_Email:etc/email_templates.xsd');
2629
$this->_testXmlAgainstXsd($fixtureXml, $schemaFile, $expectedErrors);

app/code/Magento/ImportExport/Test/Unit/Model/Export/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchemaPath = $urnResolver->getRealPath('urn:magento:module:Magento_ImportExport:etc/');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/XsdMergedTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdMergedTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_ImportExport:etc/import_merged.xsd');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/ImportExport/Test/Unit/Model/Import/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23+
if (!function_exists('libxml_set_external_entity_loader')) {
24+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
25+
}
2326
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2427
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_ImportExport:etc/import.xsd');
2528
$this->_xsdValidator = new \Magento\Framework\TestFramework\Unit\Utility\XsdValidator();

app/code/Magento/Integration/Test/Unit/Model/Config/Integration/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
1717

1818
protected function setUp()
1919
{
20+
if (!function_exists('libxml_set_external_entity_loader')) {
21+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
22+
}
2023
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2124
$this->_schemaFile = $urnResolver->getRealPath(
2225
'urn:magento:module:Magento_Integration:etc/integration/api.xsd'

app/code/Magento/Integration/Test/Unit/Model/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
1717

1818
protected function setUp()
1919
{
20+
if (!function_exists('libxml_set_external_entity_loader')) {
21+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
22+
}
2023
$urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
2124
$this->_schemaFile = $urnResolver->getRealPath(
2225
'urn:magento:module:Magento_Integration:etc/integration/config.xsd'

app/code/Magento/Sales/Test/Unit/Model/Config/XsdTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class XsdTest extends \PHPUnit_Framework_TestCase
1414

1515
public function setUp()
1616
{
17+
if (!function_exists('libxml_set_external_entity_loader')) {
18+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
19+
}
1720
$this->_xsdFile = "urn:magento:module:Magento_Sales:etc/sales.xsd";
1821
}
1922

app/code/Magento/Sales/Test/Unit/Model/Order/Pdf/Config/XsdTest.php

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ public static function setUpBeforeClass()
2626
self::$_schemaFilePath = $urnResolver->getRealPath('urn:magento:module:Magento_Sales:etc/pdf_file.xsd');
2727
}
2828

29+
public function setUp()
30+
{
31+
if (!function_exists('libxml_set_external_entity_loader')) {
32+
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
33+
}
34+
}
35+
2936
/**
3037
* @param string $fixtureXml
3138
* @param array $expectedErrors

app/code/Magento/Widget/Model/Widget.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public function getWidgetsArray($filters = [])
277277
*/
278278
public function getWidgetDeclaration($type, $params = [], $asIs = true)
279279
{
280-
$directive = '{{widget type="' . preg_quote($type) . '"';
280+
$directive = '{{widget type="' . $type . '"';
281281

282282
foreach ($params as $name => $value) {
283283
// Retrieve default option value if pre-configured

app/code/Magento/Widget/Test/Unit/Model/WidgetTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ public function testGetWidgetByClassType()
7575
$this->assertNull($this->widget->getWidgetByClassType('type2'));
7676
}
7777

78-
public function testGetWidgetDeclarationTypeWithBackslashes()
79-
{
80-
$this->assertContains(
81-
'Magento\\\\Widget\\\\Backslashed\\\\ClassName',
82-
$this->widget->getWidgetDeclaration('Magento\Widget\Backslashed\ClassName')
83-
);
84-
}
85-
8678
public function testGetConfigAsObject()
8779
{
8880
$configFile = __DIR__ . '/_files/mappedConfigArrayAll.php';

0 commit comments

Comments
 (0)