-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathGetSalableQuantityInconsistenciesWithDifferentOrderIdentitiesTest.php
More file actions
64 lines (58 loc) · 2.28 KB
/
GetSalableQuantityInconsistenciesWithDifferentOrderIdentitiesTest.php
File metadata and controls
64 lines (58 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\InventoryReservationCli\Test\Integration\Model;
use Magento\InventoryReservationCli\Model\GetSalableQuantityInconsistencies;
use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\TestCase;
/**
* Test to check ability to work correctly with entity id and increment id for inconsistencies
*/
class GetSalableQuantityInconsistenciesWithDifferentOrderIdentitiesTest extends TestCase
{
/**
* @var GetSalableQuantityInconsistencies
*/
private $getSalableQuantityInconsistencies;
/**
* Initialize test dependencies
*/
protected function setUp(): void
{
$this->getSalableQuantityInconsistencies
= Bootstrap::getObjectManager()->get(GetSalableQuantityInconsistencies::class);
}
/**
* Verify Reservation with only objectId in the metadata
*
* @magentoDataFixture Magento/Sales/_files/order.php
* @magentoDataFixture Magento_InventoryReservationCli::Test/Integration/_files/delete_reservations.php
* @magentoDataFixture Magento_InventoryReservationCli::Test/Integration/_files/reservation_with_order_id_only.php
* @magentoAppIsolation enabled
* @magentoDbIsolation disabled
* @throws \Magento\Framework\Validation\ValidationException
*/
public function testReservationWithObjectId(): void
{
$inconsistencies = $this->getSalableQuantityInconsistencies->execute();
self::assertSame([], $inconsistencies);
}
/**
* Verify Reservation with only objectIncrementId in the metadata
*
* @magentoDataFixture Magento/Sales/_files/order.php
* @magentoDataFixture Magento_InventoryReservationCli::Test/Integration/_files/delete_reservations.php
* @magentoDataFixture Magento_InventoryReservationCli::Test/Integration/_files/reservation_with_order_increment_id_only.php
* @magentoAppIsolation enabled
* @magentoDbIsolation disabled
* @throws \Magento\Framework\Validation\ValidationException
*/
public function testReservationWithObjectIncrementId(): void
{
$inconsistencies = $this->getSalableQuantityInconsistencies->execute();
self::assertSame([], $inconsistencies);
}
}