コード例 #1
0
ファイル: ItemTest.php プロジェクト: rafaelstz/magento2
 public function testSetQty()
 {
     $qty = 10;
     $orderItemQty = 100;
     $orderItemMock = $this->getMockBuilder('Magento\\Sales\\Model\\Order\\Item')->disableOriginalConstructor()->getMock();
     $orderItemMock->expects($this->once())->method('getIsQtyDecimal')->willReturn(false);
     $orderItemMock->expects($this->once())->method('getQtyToRefund')->willReturn($orderItemQty);
     $this->item->setOrderItem($orderItemMock);
     $this->item->setQty($qty);
     $this->assertEquals($qty, $this->item->getQty());
 }
コード例 #2
0
ファイル: ItemTest.php プロジェクト: Doability/magento2dev
 public function testSetQty()
 {
     $qty = 10;
     $this->item->setQty($qty);
     $this->assertEquals($qty, $this->item->getQty());
 }