Skip to content

Commit f1aeee4

Browse files
author
Michail Slabko
committed
MAGETWO-44055: [GITHUB] Admin product «Custom Options» tab controls («Import Options», «Add New Option» buttons) do not work when non-English locale is used #1971
- fix tests
1 parent 59f9e53 commit f1aeee4

File tree

7 files changed

+7
-6
lines changed

7 files changed

+7
-6
lines changed

app/code/Magento/Catalog/Model/CategoryLinkManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getAssignedProducts($categoryId)
4545
$links = [];
4646

4747
/** @var \Magento\Catalog\Model\Product $product */
48-
foreach ($products->getItems() as $productId => $product) {
48+
foreach ($products->getItems() as $product) {
4949
/** @var \Magento\Catalog\Api\Data\CategoryProductLinkInterface $link */
5050
$link = $this->productLinkFactory->create();
5151
$link->setSku($product->getSku())

app/code/Magento/Catalog/Test/Unit/Model/Config/Source/Product/Options/TypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testToOptionArray()
5151
];
5252
$expect = [
5353
['value' => '', 'label' => __('-- Please select --')],
54-
['label' => 'optionLabel', 'value' => [['label' => 'typeLabel', 'value' => 'typeName']]],
54+
['label' => 'optionLabel', 'optgroup-name' => 'optionLabel', 'value' => [['label' => 'typeLabel', 'value' => 'typeName']]],
5555
];
5656

5757
$this->productOptionConfig->expects($this->any())->method('getAll')->will($this->returnValue($allOptions));

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</button>
2222
<ul class="dropdown-menu">
2323
<li><input type="text" id="product-template-suggest" class="search"
24-
placeholder="<?php echo __('start typing to search template'); ?>"/></li>
24+
placeholder="<?php /* @noEscape */ echo __('start typing to search template'); ?>"/></li>
2525
</ul>
2626
</div>
2727
</div>

app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<input data-role="product-attribute-search"
1818
data-group="<?php echo $block->escapeHtml($block->getGroupCode()); ?>"
1919
class="search" type="text"
20-
placeholder="<?php echo __('start typing to search attribute'); ?>" />
20+
placeholder="<?php /* @noEscape */ echo __('start typing to search attribute'); ?>" />
2121
</div>
2222
</div>
2323

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Option/Type/File/ValidatorFileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ValidatorFileTest extends \PHPUnit_Framework_TestCase
1616
protected $model;
1717

1818
/**
19-
* @var \Magento\Framework\ObjectManager
19+
* @var \Magento\Framework\ObjectManagerInterface
2020
*/
2121
protected $objectManager;
2222

lib/internal/Magento/Framework/View/Element/Html/Select.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public function getTitle()
125125
* @return string
126126
*
127127
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
128+
* @SuppressWarnings(PHPMD.NPathComplexity)
128129
*/
129130
protected function _toHtml()
130131
{

lib/internal/Magento/Framework/View/Test/Unit/Element/Html/SelectTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function testGetHtml()
127127
. '<option value="testValue" paramKey="paramValue" >testLabel</option>'
128128
. '<option value="selectedValue" selected="selected" paramKey="paramValue" '
129129
. ' paramKey2="paramValue2" >selectedLabel</option>'
130-
. '<optgroup label="groupLabel">'
130+
. '<optgroup label="groupLabel" data-optgroup-name="groupLabel">'
131131
. '<option value="groupElementValue" >GroupElementLabel</option>'
132132
. '<option value="selectedGroupElementValue" selected="selected" >SelectedGroupElementLabel</option>'
133133
. '</optgroup>'

0 commit comments

Comments
 (0)