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-low-quantity-notification
Test
Integration
Model
ResourceModel
BulkConfigurationUnassignTest.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryLowQuantityNotification\Test\Integration\Model\ResourceModel
;
9
10
use
Magento\InventoryLowQuantityNotification\Model\ResourceModel\BulkConfigurationUnassign
;
11
use
Magento\InventoryLowQuantityNotificationApi\Api\GetSourceItemConfigurationInterface
;
12
use
Magento\TestFramework\Helper\Bootstrap
;
13
use PHPUnit\Framework\TestCase;
14
15
class
BulkConfigurationUnassignTest
extends
TestCase
16
{
20
private
$bulkConfigurationUnassign;
21
25
private
$getSourceItemConfiguration;
26
27
public
function
setUp
()
28
{
29
parent::setUp();
30
$this->bulkConfigurationUnassign =
Bootstrap::getObjectManager
()->get(BulkConfigurationUnassign::class);
31
$this->getSourceItemConfiguration =
32
Bootstrap::getObjectManager
()->create(GetSourceItemConfigurationInterface::class);
33
}
34
43
public
function
testUnassign
()
44
{
45
$this->bulkConfigurationUnassign->execute([
'SKU-1'
], [
'eu-1'
]);
46
$sourceConfig = $this->getSourceItemConfiguration->execute(
'eu-1'
,
'SKU-1'
);
47
48
self::assertEquals(
49
1.0,
// Default value when configuration is not defined
50
$sourceConfig->getNotifyStockQty(),
51
'Low stock notification not removed after unassign'
52
);
53
}
54
}
Magento\InventoryLowQuantityNotification\Model\ResourceModel\BulkConfigurationUnassign
Definition:
BulkConfigurationUnassign.php:15
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
Magento\InventoryLowQuantityNotification\Test\Integration\Model\ResourceModel\BulkConfigurationUnassignTest
Definition:
BulkConfigurationUnassignTest.php:15
Magento\InventoryLowQuantityNotification\Test\Integration\Model\ResourceModel\BulkConfigurationUnassignTest\setUp
setUp()
Definition:
BulkConfigurationUnassignTest.php:27
Magento\InventoryLowQuantityNotificationApi\Api\GetSourceItemConfigurationInterface
Definition:
GetSourceItemConfigurationInterface.php:18
Magento\InventoryLowQuantityNotification\Test\Integration\Model\ResourceModel\BulkConfigurationUnassignTest\testUnassign
testUnassign()
Definition:
BulkConfigurationUnassignTest.php:43
Magento\InventoryLowQuantityNotification\Test\Integration\Model\ResourceModel
Definition:
BulkConfigurationAssignTest.php:8
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125