本文整理匯總了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.');
}
示例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.");
}