當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OrderInjectable::getTotalQtyOrdered方法代碼示例

本文整理匯總了PHP中Magento\Sales\Test\Fixture\OrderInjectable::getTotalQtyOrdered方法的典型用法代碼示例。如果您正苦於以下問題:PHP OrderInjectable::getTotalQtyOrdered方法的具體用法?PHP OrderInjectable::getTotalQtyOrdered怎麽用?PHP OrderInjectable::getTotalQtyOrdered使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Sales\Test\Fixture\OrderInjectable的用法示例。


在下文中一共展示了OrderInjectable::getTotalQtyOrdered方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: processAssert

 /**
  * Assert that shipped items quantity in 'Total Quantity' is equal to data from fixture on My Account page
  *
  * @param OrderHistory $orderHistory
  * @param OrderInjectable $order
  * @param CustomerOrderView $customerOrderView
  * @param ShipmentView $shipmentView
  * @param array $ids
  * @return void
  */
 public function processAssert(OrderHistory $orderHistory, OrderInjectable $order, CustomerOrderView $customerOrderView, ShipmentView $shipmentView, array $ids)
 {
     $totalQty = $order->getTotalQtyOrdered();
     $this->loginCustomerAndOpenOrderPage($order->getDataFieldConfig('customer_id')['source']->getCustomer());
     $orderHistory->getOrderHistoryBlock()->openOrderById($order->getId());
     $customerOrderView->getOrderViewBlock()->openLinkByName('Order Shipments');
     foreach ($ids['shipmentIds'] as $key => $shipmentIds) {
         \PHPUnit_Framework_Assert::assertEquals($totalQty[$key], $shipmentView->getShipmentBlock()->getItemShipmentBlock($shipmentIds)->getTotalQty());
     }
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:20,代碼來源:AssertShipTotalQuantity.php

示例2: processAssert

 /**
  * Assert shipment with corresponding shipment/order ID is present in 'Shipments' with correct total qty field
  *
  * @param ShipmentIndex $shipmentIndex
  * @param OrderInjectable $order
  * @param array $ids
  * @return void
  */
 public function processAssert(ShipmentIndex $shipmentIndex, OrderInjectable $order, array $ids)
 {
     $shipmentIndex->open();
     $orderId = $order->getId();
     $totalQty = $order->getTotalQtyOrdered();
     foreach ($ids['shipmentIds'] as $key => $shipmentIds) {
         $filter = ['id' => $shipmentIds, 'order_id' => $orderId, 'total_qty_from' => $totalQty[$key], 'total_qty_to' => $totalQty[$key]];
         \PHPUnit_Framework_Assert::assertTrue($shipmentIndex->getShipmentsGrid()->isRowVisible($filter), 'Shipment is absent in shipment grid on shipment index page.');
     }
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:18,代碼來源:AssertShipmentInShipmentsGrid.php

示例3: processAssert

 /**
  * Assert that shipment is present in the Shipments tab with correct shipped items quantity
  *
  * @param SalesOrderView $salesOrderView
  * @param OrderIndex $orderIndex
  * @param OrderInjectable $order
  * @param array $ids
  * @return void
  */
 public function processAssert(SalesOrderView $salesOrderView, OrderIndex $orderIndex, OrderInjectable $order, array $ids)
 {
     $orderIndex->open();
     $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $order->getId()]);
     $salesOrderView->getOrderForm()->openTab('shipments');
     $totalQty = $order->getTotalQtyOrdered();
     $totalQty = is_array($totalQty) ? $totalQty : [$totalQty];
     foreach ($ids['shipmentIds'] as $key => $shipmentId) {
         $filter = ['id' => $shipmentId, 'qty_from' => $totalQty[$key], 'qty_to' => $totalQty[$key]];
         \PHPUnit_Framework_Assert::assertTrue($salesOrderView->getOrderForm()->getTabElement('shipments')->getGridBlock()->isRowVisible($filter), 'Shipment is absent on shipments tab.');
     }
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:21,代碼來源:AssertShipmentInShipmentsTab.php


注:本文中的Magento\Sales\Test\Fixture\OrderInjectable::getTotalQtyOrdered方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。