Skip to content

Commit f5f0827

Browse files
committed
MC-23633: Catalog Inventory modal refactor
1 parent a1ac22c commit f5f0827

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

app/code/Magento/CatalogInventory/Model/Stock/StockItemModifyChecker.php renamed to app/code/Magento/CatalogInventory/Model/Stock/StockItemChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* Verifies Stock item model changes.
1616
*/
17-
class StockItemModifyChecker
17+
class StockItemChecker
1818
{
1919
/**
2020
* @var StockItemRepositoryInterface

app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockItemModifyCheckerTest.php renamed to app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockItemCheckerTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\CatalogInventory\Test\Unit\Model\Stock;
99

1010
use Magento\CatalogInventory\Api\Data\StockItemInterface;
11-
use Magento\CatalogInventory\Model\Stock\StockItemModifyChecker;
11+
use Magento\CatalogInventory\Model\Stock\StockItemChecker;
1212
use Magento\CatalogInventory\Model\Stock\Item as StockItem;
1313
use Magento\CatalogInventory\Model\Stock\StockItemRepository;
1414
use Magento\Framework\Stdlib\ArrayUtils;
@@ -17,13 +17,13 @@
1717
use PHPUnit\Framework\TestCase;
1818

1919
/**
20-
* Unit test for StockItemModifyChecker.
21-
* @see StockItemModifyChecker
20+
* Unit test for StockItemChecker.
21+
* @see StockItemChecker
2222
*/
23-
class StockItemModifyCheckerTest extends TestCase
23+
class StockItemCheckerTest extends TestCase
2424
{
2525
/**
26-
* @var StockItemModifyChecker
26+
* @var StockItemChecker
2727
*/
2828
private $model;
2929

@@ -54,7 +54,7 @@ protected function setUp()
5454
$this->stockItemModel = $this->createPartialMock(StockItem::class, ['getId', 'getData']);
5555

5656
$this->model = $objectManager->getObject(
57-
StockItemModifyChecker::class,
57+
StockItemChecker::class,
5858
[
5959
'stockItemRepository' => $this->stockItemRepository,
6060
'arrayUtils' => $this->arrayUtils,
@@ -64,7 +64,7 @@ protected function setUp()
6464
}
6565

6666
/**
67-
* Test for IsModified method when model is new.
67+
* Test for isModified method when model is new.
6868
*
6969
* @return void
7070
*/
@@ -77,7 +77,7 @@ public function testIsModifiedWhenModelIsNew(): void
7777
}
7878

7979
/**
80-
* Test for IsModified method when found difference between data.
80+
* Test for isModified method when found difference between data.
8181
*
8282
* @param array $itemFromRepository
8383
* @param array $model

app/code/Magento/CatalogInventory/etc/adminhtml/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<type name="Magento\Catalog\Model\ProductLink\Search">
4848
<plugin name="processOutOfStockProducts" type="Magento\CatalogInventory\Model\Plugin\ProductSearch"/>
4949
</type>
50-
<type name="Magento\CatalogInventory\Model\Stock\StockItemModifyChecker">
50+
<type name="Magento\CatalogInventory\Model\Stock\StockItemChecker">
5151
<arguments>
5252
<argument name="skippedAttributes" xsi:type="array">
5353
<item name="low_stock_date" xsi:type="const">Magento\CatalogInventory\Api\Data\StockItemInterface::LOW_STOCK_DATE</item>

0 commit comments

Comments
 (0)