public function testCheckoutAllSubmitAfter()
 {
     $quote = $this->getMock('Magento\\Quote\\Model\\Quote', ['getInventoryProcessed'], [], '', false);
     $quote->expects($this->once())->method('getInventoryProcessed')->will($this->returnValue(false));
     $this->event->expects($this->once())->method('getQuote')->will($this->returnValue($quote));
     $this->subtractQuoteInventoryObserver->expects($this->once())->method('execute')->with($this->eventObserver);
     $this->reindexQuoteInventoryObserver->expects($this->once())->method('execute')->with($this->eventObserver);
     $this->observer->execute($this->eventObserver);
 }
 /**
  * Subtract qtys of quote item products after multishipping checkout
  *
  * @param EventObserver $observer
  * @return $this
  */
 public function execute(EventObserver $observer)
 {
     $quote = $observer->getEvent()->getQuote();
     if (!$quote->getInventoryProcessed()) {
         $this->subtractQuoteInventoryObserver->execute($observer);
         $this->reindexQuoteInventoryObserver->execute($observer);
     }
     return $this;
 }