Skip to content

Commit 1b4765a

Browse files
committed
MAGETWO-34729: Code coverage
1 parent 38a7fbb commit 1b4765a

File tree

5 files changed

+44
-13
lines changed

5 files changed

+44
-13
lines changed

app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total/DiscountTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public function setUp()
4141
'',
4242
false
4343
);
44-
$this->orderItemMock = $this->getMock('Magento\Sales\Model\Order',
44+
$this->orderItemMock = $this->getMock(
45+
'Magento\Sales\Model\Order',
4546
[
4647
'isDummy', 'getDiscountInvoiced', 'getBaseDiscountInvoiced', 'getQtyInvoiced', 'getQty',
4748
'getDiscountRefunded', 'getQtyRefunded'
@@ -50,7 +51,8 @@ public function setUp()
5051
'',
5152
false
5253
);
53-
$this->creditmemoMock = $this->getMock('\Magento\Sales\Model\Order\Creditmemo',
54+
$this->creditmemoMock = $this->getMock(
55+
'\Magento\Sales\Model\Order\Creditmemo',
5456
[
5557
'setBaseCost', 'getAllItems', 'getOrder', 'getBaseShippingAmount', 'roundPrice',
5658
'setDiscountAmount', 'setBaseDiscountAmount'

app/code/Magento/Sales/Test/Unit/Model/Order/Grid/Massaction/ItemsUpdaterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ public function testUpdate()
4646
);
4747
$this->assertEquals(['other' => null], $this->itemUpdater->update($arguments));
4848
}
49-
}
49+
}

app/code/Magento/Sales/Test/Unit/Model/Order/Grid/Row/UrlGeneratorTest.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\Sales\Test\Unit\Model\Order\Grid\Row;
88

9-
class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
9+
class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
1010
{
1111
/**
1212
* @var \Magento\Sales\Model\Order\Grid\Row\UrlGenerator
@@ -24,10 +24,22 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
2424
public function setUp()
2525
{
2626
$this->urlMock = $this->getMockForAbstractClass(
27-
'Magento\Backend\Model\UrlInterface', [], '', false, false, true, []
27+
'Magento\Backend\Model\UrlInterface',
28+
[],
29+
'',
30+
false,
31+
false,
32+
true,
33+
[]
2834
);
2935
$this->authorizationMock = $this->getMockForAbstractClass(
30-
'Magento\Framework\AuthorizationInterface', [], '', false, false, true, []
36+
'Magento\Framework\AuthorizationInterface',
37+
[],
38+
'',
39+
false,
40+
false,
41+
true,
42+
[]
3143
);
3244
$this->urlGenerator = new \Magento\Sales\Model\Order\Grid\Row\UrlGenerator(
3345
$this->urlMock,

app/code/Magento/Sales/Test/Unit/Model/Order/Invoice/Grid/Row/UrlGeneratorTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,22 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
2424
public function setUp()
2525
{
2626
$this->urlMock = $this->getMockForAbstractClass(
27-
'Magento\Backend\Model\UrlInterface', [], '', false, false, true, []
27+
'Magento\Backend\Model\UrlInterface',
28+
[],
29+
'',
30+
false,
31+
false,
32+
true,
33+
[]
2834
);
2935
$this->authorizationMock = $this->getMockForAbstractClass(
30-
'Magento\Framework\AuthorizationInterface', [], '', false, false, true, []
36+
'Magento\Framework\AuthorizationInterface',
37+
[],
38+
'',
39+
false,
40+
false,
41+
true,
42+
[]
3143
);
3244
$this->urlGenerator = new \Magento\Sales\Model\Order\Invoice\Grid\Row\UrlGenerator(
3345
$this->urlMock, $this->authorizationMock, [

app/code/Magento/Sales/Test/Unit/Model/Order/Invoice/ItemTest.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,29 @@ class ItemTest extends \PHPUnit_Framework_TestCase
3636
public function setUp()
3737
{
3838
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
39-
$this->orderItemFactoryMock = $this->getMock('Magento\Sales\Model\Order\ItemFactory',
39+
$this->orderItemFactoryMock = $this->getMock(
40+
'Magento\Sales\Model\Order\ItemFactory',
4041
['create'],
4142
[],
4243
'',
4344
false
4445
);
45-
$this->invoiceMock = $this->getMock('Magento\Sales\Model\Order\Invoice',
46+
$this->invoiceMock = $this->getMock(
47+
'Magento\Sales\Model\Order\Invoice',
4648
[],
4749
[],
4850
'',
4951
false
5052
);
51-
$this->orderMock = $this->getMock('Magento\Sales\Model\Order',
53+
$this->orderMock = $this->getMock(
54+
'Magento\Sales\Model\Order',
5255
[],
5356
[],
5457
'',
5558
false
5659
);
57-
$this->orderItemMock = $this->getMock('Magento\Sales\Model\Order\Item',
60+
$this->orderItemMock = $this->getMock(
61+
'Magento\Sales\Model\Order\Item',
5862
[
5963
'load', 'isDummy', 'getIsQtyDecimal', 'getQtyToInvoice', 'getQtyInvoiced', 'getTaxInvoiced',
6064
'getBaseTaxInvoiced', 'getHiddenTaxInvoiced', 'getBaseHiddenTaxInvoiced', 'getDiscountInvoiced',
@@ -67,7 +71,8 @@ public function setUp()
6771
'',
6872
false
6973
);
70-
$this->item = $this->objectManager->getObject('Magento\Sales\Model\Order\Invoice\Item',
74+
$this->item = $this->objectManager->getObject(
75+
'Magento\Sales\Model\Order\Invoice\Item',
7176
[
7277
'orderItemFactory' => $this->orderItemFactoryMock
7378
]

0 commit comments

Comments
 (0)