Ejemplo n.º 1
0
 /**
  * Get Order Items
  * 
  * @param OrderData $dataObject
  * @return array
  */
 protected function getItems(OrderData $dataObject)
 {
     $items = [];
     foreach ($dataObject->getItems() as $item) {
         $items[] = $this->itemConverter->getModel($item);
     }
     return $items;
 }
Ejemplo n.º 2
0
 protected function getItems()
 {
     $this->orderDataMock->expects($this->any())->method('getItems')->will($this->returnValue($this->orderData['items']));
     $orderItem1 = $this->getMock('Magento\\Sales\\Model\\Order\\Item', [], [], '', false);
     $orderItem2 = $this->getMock('Magento\\Sales\\Model\\Order\\Item', [], [], '', false);
     $this->itemConverterMock->expects($this->any())->method('getModel')->will($this->returnValueMap([[$this->orderData['items']['01'], $orderItem1], [$this->orderData['items']['02'], $orderItem2]]));
     return [$orderItem1, $orderItem2];
 }