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-catalog
Test
Integration
GetSkusByProductIdsTest.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryCatalog\Test\Integration
;
9
10
use
Magento\InventoryCatalogApi\Model\GetSkusByProductIdsInterface
;
11
use
Magento\TestFramework\Helper\Bootstrap
;
12
use PHPUnit\Framework\TestCase;
13
14
class
GetSkusByProductIdsTest
extends
TestCase
15
{
19
private
$getSkusByProductIds;
20
21
protected
function
setUp
()
22
{
23
parent::setUp();
24
25
$this->getSkusByProductIds =
Bootstrap::getObjectManager
()->get(GetSkusByProductIdsInterface::class);
26
}
27
31
public
function
testExecute
()
32
{
33
$skuById = [101 =>
'search_product_1'
, 102 =>
'search_product_2'
, 103 =>
'search_product_3'
];
34
35
self::assertEquals($skuById, $this->getSkusByProductIds->execute(array_keys($skuById)));
36
}
37
44
public
function
testExecuteWithNotExistedIds
()
45
{
46
$ids = [998, 999, 102];
47
48
$this->getSkusByProductIds->execute($ids);
49
}
50
}
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
Magento\InventoryCatalog\Test\Integration\GetSkusByProductIdsTest\setUp
setUp()
Definition:
GetSkusByProductIdsTest.php:21
Magento\InventoryCatalog\Test\Integration\GetSkusByProductIdsTest
Definition:
GetSkusByProductIdsTest.php:14
Magento\InventoryCatalog\Test\Integration\GetSkusByProductIdsTest\testExecute
testExecute()
Definition:
GetSkusByProductIdsTest.php:31
Magento\InventoryCatalog\Test\Integration\GetSkusByProductIdsTest\testExecuteWithNotExistedIds
testExecuteWithNotExistedIds()
Definition:
GetSkusByProductIdsTest.php:44
Magento\InventoryCatalogApi\Model\GetSkusByProductIdsInterface
Definition:
GetSkusByProductIdsInterface.php:16
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125
Magento\InventoryCatalog\Test\Integration