Example #1
0
 public function testUpdateQuoteItemsWithConfiguredOption()
 {
     $qty = 100000000;
     $items = [1 => ['qty' => 10, 'configured' => true, 'action' => false]];
     $itemMock = $this->getMock('Magento\\Quote\\Model\\Quote\\Item', [], [], '', false);
     $itemMock->expects($this->once())->method('getQty')->will($this->returnValue($qty));
     $quoteMock = $this->getMock('Magento\\Quote\\Model\\Quote', [], [], '', false);
     $quoteMock->expects($this->once())->method('updateItem')->will($this->returnValue($itemMock));
     $this->sessionQuoteMock->expects($this->any())->method('getQuote')->will($this->returnValue($quoteMock));
     $expectedInfo = $items[1];
     $expectedInfo['qty'] = $qty;
     $this->itemUpdater->expects($this->once())->method('update')->with($this->equalTo($itemMock), $this->equalTo($expectedInfo));
     $this->adminOrderCreate->setRecollect(false);
     $this->adminOrderCreate->updateQuoteItems($items);
 }