Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-inventory-sales-admin-ui
Test
Integration
Model
ResourceModel
GetAssignedStockIdsBySkuTest.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventorySalesAdminUi\Test\Integration\Model\ResourceModel
;
9
10
use PHPUnit\Framework\TestCase;
11
use
Magento\TestFramework\Helper\Bootstrap
;
12
use
Magento\InventorySalesAdminUi\Model\ResourceModel\GetAssignedStockIdsBySku
;
13
14
class
GetAssignedStockIdsBySkuTest
extends
TestCase
15
{
19
private
$getAssignedStockIdsBySku;
20
21
protected
function
setUp
()
22
{
23
parent::setUp();
24
25
$this->getAssignedStockIdsBySku =
Bootstrap::getObjectManager
()->get(GetAssignedStockIdsBySku::class);
26
}
27
37
public
function
testExecute
()
38
{
39
$productSku =
'SKU-1'
;
40
$expectedStockIds = [10, 30];
41
42
self::assertEquals($expectedStockIds, $this->getAssignedStockIdsBySku->execute($productSku));
43
}
44
}
Magento\InventorySalesAdminUi\Test\Integration\Model\ResourceModel\GetAssignedStockIdsBySkuTest\setUp
setUp()
Definition:
GetAssignedStockIdsBySkuTest.php:21
Magento\InventorySalesAdminUi\Test\Integration\Model\ResourceModel
Definition:
GetAssignedStockIdsBySkuTest.php:8
Magento\InventorySalesAdminUi\Model\ResourceModel\GetAssignedStockIdsBySku
Definition:
GetAssignedStockIdsBySku.php:16
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
Magento\InventorySalesAdminUi\Test\Integration\Model\ResourceModel\GetAssignedStockIdsBySkuTest\testExecute
testExecute()
Definition:
GetAssignedStockIdsBySkuTest.php:37
Magento\InventorySalesAdminUi\Test\Integration\Model\ResourceModel\GetAssignedStockIdsBySkuTest
Definition:
GetAssignedStockIdsBySkuTest.php:14
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125