Skip to content

Commit 20618e3

Browse files
committed
Merge remote-tracking branch 'remotes/mainline_ce/develop' into MAGETWO-35076
2 parents f555e5b + 051fc59 commit 20618e3

File tree

20 files changed

+1270
-111
lines changed

20 files changed

+1270
-111
lines changed

app/code/Magento/Backend/Block/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ protected function _addSubMenu($menuItem, $level, $limit)
410410
if ($level == 0 && $limit) {
411411
$colStops = $this->_columnBrake($menuItem->getChildren(), $limit);
412412
$output .= '<strong class="submenu-title">' . $this->_getAnchorLabel($menuItem) . '</strong>';
413-
$output .= '<button class="submenu-close _close"></button>';
413+
$output .= '<a href="#" class="submenu-close _close" data-role="close-submenu"></a>';
414414
}
415415

416416
$output .= $this->renderNavigation($menuItem->getChildren(), $level + 1, $limit, $colStops);

app/code/Magento/Bundle/view/base/web/js/price-bundle.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ define([
2222
' +<%- finalPrice.formatted %>' +
2323
'<% } %>',
2424
controlContainer: 'dd', // should be eliminated
25-
priceFormat: {}
25+
priceFormat: {},
26+
isFixedPrice: false
2627
};
2728

2829
$.widget('mage.priceBundle', {
@@ -116,17 +117,17 @@ define([
116117
*/
117118
_applyQtyFix: function applyQtyFix() {
118119
var config = this.options.optionConfig;
119-
_.each(config.options, function (option) {
120-
_.each(option.selections, function (item) {
121-
if (item.priceType === '0') {
120+
if (config.isFixedPrice) {
121+
_.each(config.options, function (option) {
122+
_.each(option.selections, function (item) {
122123
if (item.qty && item.qty !== 1) {
123124
_.each(item.prices, function (price) {
124125
price.amount = price.amount / item.qty;
125126
});
126127
}
127-
}
128+
});
128129
});
129-
});
130+
}
130131
},
131132

132133
/**

app/code/Magento/Catalog/Pricing/Price/TierPrice.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ protected function filterTierPrices(array $priceList)
162162
$qtyCache = [];
163163
foreach ($priceList as $priceKey => $price) {
164164
/* filter price by customer group */
165-
if ($price['cust_group'] !== $this->customerGroup && $price['cust_group'] !== $this->groupManagement->getAllCustomersGroup()->getId()) {
165+
if ($price['cust_group'] != $this->customerGroup &&
166+
$price['cust_group'] != $this->groupManagement->getAllCustomersGroup()->getId()) {
166167
unset($priceList[$priceKey]);
167168
continue;
168169
}

app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ $product = $block->getSaleableItem();
7373
);
7474
?><?php echo __('each') ?>
7575
<?php if ($block->getShowDetailedPrice() !== false): ?>
76-
<?php echo __('and') ?>&nbsp;<strong class="benefit"><?php echo __('save')?>
77-
<span class="percent tier-<?php echo $index ?>"><?php echo $tierPriceModel->getSavePercent($price['price']) ?></span>%
76+
&nbsp;<?php echo __('and') ?>&nbsp;<strong class="benefit"><?php echo __('save')?>
77+
<span class="percent tier-<?php echo $index ?>">&nbsp;<?php echo $tierPriceModel->getSavePercent($price['price']) ?></span>%
7878
</strong>
7979
<?php endif ?>
8080
<?php endif; ?>

app/code/Magento/Sales/Api/Data/ShipmentInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function getComments();
253253
* @param \Magento\Sales\Api\Data\ShipmentCommentInterface[] $comments
254254
* @return $this
255255
*/
256-
public function setComments(array $comments = null);
256+
public function setComments($comments = null);
257257

258258
/**
259259
* Sets the store ID for the shipment.

app/code/Magento/Sales/Model/Order/Creditmemo/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function setQty($qty)
167167
/**
168168
* Applying qty to order item
169169
*
170-
* @return \Magento\Sales\Model\Order\Shipment\Item
170+
* @return \Magento\Sales\Model\Order\Creditmemo\Item
171171
*/
172172
public function register()
173173
{

app/code/Magento/Sales/Model/Order/Shipment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ public function getComments()
733733
* @param \Magento\Sales\Api\Data\ShipmentCommentInterface[] $comments
734734
* @return $this
735735
*/
736-
public function setComments(array $comments = null)
736+
public function setComments($comments = null)
737737
{
738738
return $this->setData(ShipmentInterface::COMMENTS, $comments);
739739
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Sales\Test\Unit\Model\Order\Admin;
7+
8+
/**
9+
* Class ValidatorTest
10+
*/
11+
class ItemTest extends \PHPUnit_Framework_TestCase
12+
{
13+
/**
14+
* @var \PHPUnit_Framework_MockObject_MockObject
15+
*/
16+
protected $orderItemMock;
17+
18+
/** @var \Magento\Sales\Model\Order\Admin\Item */
19+
protected $item;
20+
21+
22+
public function setUp()
23+
{
24+
$this->orderItemMock = $this->getMockBuilder('Magento\Sales\Model\Order\Item')
25+
->disableOriginalConstructor()
26+
->getMock();
27+
$this->item = new \Magento\Sales\Model\Order\Admin\Item();
28+
}
29+
30+
public function testGetSku()
31+
{
32+
$sku = 'sku';
33+
$this->orderItemMock->expects($this->once())
34+
->method('getSku')
35+
->willReturn($sku);
36+
$result = $this->item->getSku($this->orderItemMock);
37+
$this->assertEquals($sku, $result);
38+
}
39+
40+
public function testGetName()
41+
{
42+
$name = 'name';
43+
$this->orderItemMock->expects($this->once())
44+
->method('getName')
45+
->willReturn($name);
46+
$result = $this->item->getName($this->orderItemMock);
47+
$this->assertEquals($name, $result);
48+
}
49+
50+
public function testGetProductId()
51+
{
52+
$productId = 1;
53+
$this->orderItemMock->expects($this->once())
54+
->method('getProductId')
55+
->willReturn($productId);
56+
$result = $this->item->getProductId($this->orderItemMock);
57+
$this->assertEquals($productId, $result);
58+
}
59+
}

0 commit comments

Comments
 (0)