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


PHP OrderInjectable::getData方法代碼示例

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


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

示例1: processAssert

 /**
  * Assert that order with fixture data in not more in the Orders grid
  *
  * @param OrderInjectable $order
  * @param OrderIndex $orderIndex
  * @return void
  */
 public function processAssert(OrderInjectable $order, OrderIndex $orderIndex)
 {
     $data = $order->getData();
     $filter = ['id' => $data['id']];
     $orderIndex->open();
     $errorMessage = implode(', ', $filter);
     \PHPUnit_Framework_Assert::assertFalse($orderIndex->getSalesOrderGrid()->isRowVisible($filter), 'Order with following data \'' . $errorMessage . '\' is present in Orders grid.');
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:15,代碼來源:AssertOrderNotInOrdersGrid.php

示例2: processAssert

 /**
  * Assert coupon info in report: code, rule name, subtotal, discount on coupons report page
  *
  * @param SalesCouponReportView $salesCouponReportView
  * @param OrderInjectable $order
  * @param string $currency
  * @return void
  */
 public function processAssert(SalesCouponReportView $salesCouponReportView, OrderInjectable $order, $currency = '$')
 {
     $data = $order->getData();
     $discount = $data['price']['discount'] != 0 ? '-' . $currency . number_format($data['price']['discount'], 2) : $currency . '0.00';
     $couponCode = $data['coupon_code']->getCouponCode();
     $filter = ['coupon_code' => $couponCode, 'rule_name' => $data['coupon_code']->getName(), 'subtotal' => $currency . number_format($data['price']['subtotal'], 2), 'discount' => $discount];
     \PHPUnit_Framework_Assert::assertTrue($salesCouponReportView->getGridBlock()->isRowVisible($filter, false), "Coupon with code - '{$couponCode}' is not visible.");
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:16,代碼來源:AssertCouponReportResult.php


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