Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
QuoteManagementTest Class Reference
Inheritance diagram for QuoteManagementTest:

Public Member Functions

 testSubmitWithItemOutOfStock ()
 

Protected Member Functions

 setUp ()
 

Detailed Description

Class for testing QuoteManagement model

Definition at line 22 of file QuoteManagementTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 37 of file QuoteManagementTest.php.

38  {
39  $this->objectManager = Bootstrap::getObjectManager();
40 
41  $this->cartManagement = $this->objectManager->create(CartManagementInterface::class);
42  }

◆ testSubmitWithItemOutOfStock()

testSubmitWithItemOutOfStock ( )

Tries to create order with item of stock during checkout.

@magentoDataFixture Magento/Sales/_files/quote.php @expectedException \Magento\Framework\Exception\LocalizedException @expectedExceptionMessage Some of the products are out of stock. @magentoDbIsolation enabled

Definition at line 97 of file QuoteManagementTest.php.

98  {
99  $this->makeProductOutOfStock('simple');
100  $quote = $this->getQuote('test01');
101  $this->cartManagement->placeOrder($quote->getId());
102  }
$quote

The documentation for this class was generated from the following file: