Skip to content

Commit de58c64

Browse files
authored
Merge pull request #1599 from magento-engcom/2.2-develop-prs
[EngCom] Public Pull Requests - 2.2-develop
2 parents f1e6d1c + f7de292 commit de58c64

File tree

13 files changed

+56
-158
lines changed

13 files changed

+56
-158
lines changed

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ env:
2929
- TEST_SUITE=integration INTEGRATION_INDEX=1
3030
- TEST_SUITE=integration INTEGRATION_INDEX=2
3131
- TEST_SUITE=integration INTEGRATION_INDEX=3
32-
- TEST_SUITE=functional ACCEPTANCE_INDEX=1
33-
- TEST_SUITE=functional ACCEPTANCE_INDEX=2
32+
- TEST_SUITE=functional
3433
matrix:
3534
exclude:
3635
- php: 7.0
@@ -40,9 +39,7 @@ matrix:
4039
- php: 7.0
4140
env: TEST_SUITE=js GRUNT_COMMAND=static
4241
- php: 7.0
43-
env: TEST_SUITE=functional ACCEPTANCE_INDEX=1
44-
- php: 7.0
45-
env: TEST_SUITE=functional ACCEPTANCE_INDEX=2
42+
env: TEST_SUITE=functional
4643
cache:
4744
apt: true
4845
directories:

app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Item/StockItemCriteriaMapper.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,9 @@ public function mapWebsiteFilter($website)
9999
/**
100100
* @inheritdoc
101101
*/
102-
public function mapProductsFilter($products)
102+
public function mapProductsFilter(...$products)
103103
{
104104
$productIds = [];
105-
if (!is_array($products)) {
106-
$products = [$products];
107-
}
108105
foreach ($products as $product) {
109106
if ($product instanceof \Magento\Catalog\Model\Product) {
110107
$productIds[] = $product->getId();

app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status/StockStatusCriteriaMapper.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,9 @@ public function mapWebsiteFilter($website)
5656
* @param int|array|\Magento\Catalog\Model\Product|\Magento\Catalog\Model\Product[] $products
5757
* @return void
5858
*/
59-
public function mapProductsFilter($products)
59+
public function mapProductsFilter(...$products)
6060
{
6161
$productIds = [];
62-
if (!is_array($products)) {
63-
$products = [$products];
64-
}
6562
foreach ($products as $product) {
6663
if ($product instanceof \Magento\Catalog\Model\Product) {
6764
$productIds[] = $product->getId();

app/code/Magento/Email/Model/Source/Variables.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function __construct()
4747
['value' => 'general/store_information/city', 'label' => __('City')],
4848
['value' => 'general/store_information/street_line1', 'label' => __('Street Address 1')],
4949
['value' => 'general/store_information/street_line2', 'label' => __('Street Address 2')],
50+
['value' => 'general/store_information/merchant_vat_number', 'label' => __('VAT Number')],
5051
];
5152
}
5253

app/code/Magento/Email/Test/Unit/Model/Source/VariablesTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ protected function setup()
5353
['value' => 'general/store_information/city', 'label' => __('City')],
5454
['value' => 'general/store_information/street_line1', 'label' => __('Street Address 1')],
5555
['value' => 'general/store_information/street_line2', 'label' => __('Street Address 2')],
56+
['value' => 'general/store_information/merchant_vat_number', 'label' => __('VAT Number')],
5657
];
5758
}
5859

app/code/Magento/Email/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Region/State,Region/State
5454
City,City
5555
"Street Address 1","Street Address 1"
5656
"Street Address 2","Street Address 2"
57+
"VAT Number","VAT Number"
5758
"Store Contact Information","Store Contact Information"
5859
%1,%1
5960
"Template Variables","Template Variables"

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ protected function _convertDepends($source)
222222
{
223223
$depends = [];
224224
foreach ($source->childNodes as $childNode) {
225-
if ($childNode->nodeName == '#text') {
225+
if ($childNode->nodeName === '#text') {
226226
continue;
227227
}
228228
if ($childNode->nodeName !== 'parameter') {
@@ -231,12 +231,23 @@ protected function _convertDepends($source)
231231
);
232232
}
233233
$parameterAttributes = $childNode->attributes;
234-
$depends[$parameterAttributes->getNamedItem(
235-
'name'
236-
)->nodeValue] = [
237-
'value' => $parameterAttributes->getNamedItem('value')->nodeValue,
238-
];
234+
$dependencyName = $parameterAttributes->getNamedItem('name')->nodeValue;
235+
$dependencyValue = $parameterAttributes->getNamedItem('value')->nodeValue;
236+
237+
if (!isset($depends[$dependencyName])) {
238+
$depends[$dependencyName] = [
239+
'value' => $dependencyValue,
240+
];
241+
242+
continue;
243+
} else if (!isset($depends[$dependencyName]['values'])) {
244+
$depends[$dependencyName]['values'] = [$depends[$dependencyName]['value']];
245+
unset($depends[$dependencyName]['value']);
246+
}
247+
248+
$depends[$dependencyName]['values'][] = $dependencyValue;
239249
}
250+
240251
return $depends;
241252
}
242253

app/code/Magento/Widget/etc/widget.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@
212212
<xs:annotation>
213213
<xs:documentation>List of parameters this parameter depends on.</xs:documentation>
214214
</xs:annotation>
215-
<xs:all>
215+
<xs:sequence maxOccurs="unbounded">
216216
<xs:element name="parameter" type="dependsParameterType" />
217-
</xs:all>
217+
</xs:sequence>
218218
</xs:complexType>
219219
</xs:schema>

app/code/Magento/Widget/etc/widget_file.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@
212212
<xs:annotation>
213213
<xs:documentation>List of parameters this parameter depends on.</xs:documentation>
214214
</xs:annotation>
215-
<xs:all>
215+
<xs:sequence maxOccurs="unbounded">
216216
<xs:element name="parameter" type="dependsParameterType" />
217-
</xs:all>
217+
</xs:sequence>
218218
</xs:complexType>
219219
</xs:schema>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd">
10+
<rule scope="testcase">
11+
<allow>
12+
<tag group="test_type" value="acceptance_test" />
13+
</allow>
14+
<deny>
15+
<tag group="stable" value="no" />
16+
</deny>
17+
</rule>
18+
<rule scope="variation">
19+
<allow>
20+
<tag group="test_type" value="acceptance_test" />
21+
<tag group="severity" value="S0, S1" />
22+
</allow>
23+
<deny>
24+
<tag group="stable" value="no" />
25+
</deny>
26+
</rule>
27+
</config>

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/travis_acceptance_1.xml

Lines changed: 0 additions & 67 deletions
This file was deleted.

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/travis_acceptance_2.xml

Lines changed: 0 additions & 67 deletions
This file was deleted.

dev/travis/before_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ case $TEST_SUITE in
126126

127127
cp ./phpunit.xml.dist ./phpunit.xml
128128
sed -e "s?127.0.0.1?${MAGENTO_HOST_NAME}?g" --in-place ./phpunit.xml
129-
sed -e "s?basic?travis_acceptance_${ACCEPTANCE_INDEX}?g" --in-place ./phpunit.xml
129+
sed -e "s?basic?travis_acceptance?g" --in-place ./phpunit.xml
130130
cp ./.htaccess.sample ./.htaccess
131131
cd ./utils
132132
php -f mtf troubleshooting:check-all

0 commit comments

Comments
 (0)