Skip to content

Commit 376e29e

Browse files
author
Viktor Paladiychuk
committed
MAGETWO-56702: Around plugins refactoring: refactoring and unit test fixing/coverage
1 parent 76defb9 commit 376e29e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\GiftMessage\Block\Message\Multishipping\Plugin;
77

8-
use Magento\Multishipping\Block\Checkout\Shipping;
9-
use Magento\GiftMessage\Helper\Message as HelperMessage;
8+
use Magento\Multishipping\Block\Checkout\Shipping as ShippingBlock;
9+
use Magento\GiftMessage\Helper\Message as MessageHelper;
1010
use Magento\Framework\DataObject;
1111

1212
/**
@@ -17,31 +17,31 @@ class ItemsBox
1717
/**
1818
* Gift message helper
1919
*
20-
* @var HelperMessage
20+
* @var MessageHelper
2121
*/
2222
protected $helper;
2323

2424
/**
2525
* Construct
2626
*
27-
* @param HelperMessage $helper
27+
* @param MessageHelper $helper
2828
*/
29-
public function __construct(HelperMessage $helper)
29+
public function __construct(MessageHelper $helper)
3030
{
3131
$this->helper = $helper;
3232
}
3333

3434
/**
3535
* Get items box message text for multishipping
3636
*
37-
* @param Shipping $subject
37+
* @param ShippingBlock $subject
3838
* @param string $itemsBoxText
3939
* @param DataObject $addressEntity
4040
*
4141
* @return string
4242
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
4343
*/
44-
public function afterGetItemsBoxTextAfter(Shipping $subject, $itemsBoxText, DataObject $addressEntity)
44+
public function afterGetItemsBoxTextAfter(ShippingBlock $subject, $itemsBoxText, DataObject $addressEntity)
4545
{
4646
return $itemsBoxText . $this->helper->getInline('multishipping_address', $addressEntity);
4747
}

app/code/Magento/GiftMessage/Model/Plugin/QuoteItem.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
namespace Magento\GiftMessage\Model\Plugin;
77

88
use Magento\Sales\Api\Data\OrderItemInterface;
9-
use Magento\GiftMessage\Helper\Message as HelperMessage;
9+
use Magento\GiftMessage\Helper\Message as MessageHelper;
1010
use Magento\Quote\Model\Quote\Item\ToOrderItem;
1111
use Magento\Quote\Model\Quote\Item\AbstractItem;
1212

1313
class QuoteItem
1414
{
1515
/**
16-
* @var HelperMessage
16+
* @var MessageHelper
1717
*/
1818
protected $_helper;
1919

2020
/**
21-
* @param HelperMessage $helper
21+
* @param MessageHelper $helper
2222
*/
23-
public function __construct(HelperMessage $helper)
23+
public function __construct(MessageHelper $helper)
2424
{
2525
$this->_helper = $helper;
2626
}

app/code/Magento/GiftMessage/Test/Unit/Model/Plugin/QuoteItemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function setUp()
6868
$this->model = new \Magento\GiftMessage\Model\Plugin\QuoteItem($this->helperMock);
6969
}
7070

71-
public function testAroundItemToOrderItem()
71+
public function testAfterItemToOrderItem()
7272
{
7373
$storeId = 1;
7474
$giftMessageId = 1;

0 commit comments

Comments
 (0)