Skip to content

Commit e5ab9fd

Browse files
author
Victor Rad
committed
MAGETWO-37983: Improve test code coverage
- static test fix
1 parent 8060802 commit e5ab9fd

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

app/code/Magento/CatalogInventory/Test/Unit/Block/Stockqty/DefaultStockqtyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,6 @@ protected function setDataArrayValue($key, $value)
211211
public function testGetThresholdQty()
212212
{
213213
$this->scopeConfigMock->expects($this->once())->method('getValue')->willReturn(5);
214-
$this->assertEquals(5,$this->block->getThresholdQty());
214+
$this->assertEquals(5, $this->block->getThresholdQty());
215215
}
216216
}

app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockItemRepositoryTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
namespace Magento\CatalogInventory\Test\Unit\Model\Stock;
77

88
use \Magento\CatalogInventory\Model\Stock\StockItemRepository;
9+
use \Magento\CatalogInventory\Api\Data as InventoryApiData;
910

1011
/**
1112
* Class StockItemRepositoryTest
13+
*
14+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1215
*/
1316
class StockItemRepositoryTest extends \PHPUnit_Framework_TestCase
1417
{
@@ -42,12 +45,12 @@ class StockItemRepositoryTest extends \PHPUnit_Framework_TestCase
4245
protected $stockItemResourceMock;
4346

4447
/**
45-
* @var \Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
48+
* @var InventoryApiData\StockItemInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
4649
*/
4750
protected $stockItemFactoryMock;
4851

4952
/**
50-
* @var \Magento\CatalogInventory\Api\Data\StockItemCollectionInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
53+
* @var InventoryApiData\StockItemCollectionInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
5154
*/
5255
protected $stockItemCollectionMock;
5356

app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockStatusRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\CatalogInventory\Test\Unit\Model\Stock;
77

88
use \Magento\CatalogInventory\Model\Stock\StockStatusRepository;
9+
use \Magento\CatalogInventory\Api\Data as InventoryApiData;
910

1011
/**
1112
* Class StockStatusRepositoryTest
@@ -33,7 +34,7 @@ class StockStatusRepositoryTest extends \PHPUnit_Framework_TestCase
3334
protected $stockStatusFactoryMock;
3435

3536
/**
36-
* @var Magento\CatalogInventory\Api\Data\StockStatusCollectionInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
37+
* @var InventoryApiData\StockStatusCollectionInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
3738
*/
3839
protected $stockStatusCollectionMock;
3940

0 commit comments

Comments
 (0)