本文整理汇总了PHP中Magento\Checkout\Test\Page\CheckoutCart::getProceedToCheckoutBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP CheckoutCart::getProceedToCheckoutBlock方法的具体用法?PHP CheckoutCart::getProceedToCheckoutBlock怎么用?PHP CheckoutCart::getProceedToCheckoutBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Checkout\Test\Page\CheckoutCart
的用法示例。
在下文中一共展示了CheckoutCart::getProceedToCheckoutBlock方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processAssert
/**
* Assert that prices on order review and customer order pages are equal to specified in dataset.
*
* @param array $prices
* @param InjectableFixture $product
* @param CheckoutCart $checkoutCart
* @param CheckoutOnepage $checkoutOnepage
* @param CheckoutOnepageSuccess $checkoutOnepageSuccess
* @param CustomerOrderView $customerOrderView
* @return void
*/
public function processAssert(array $prices, InjectableFixture $product, CheckoutCart $checkoutCart, CheckoutOnepage $checkoutOnepage, CheckoutOnepageSuccess $checkoutOnepageSuccess, CustomerOrderView $customerOrderView)
{
$this->checkoutOnepage = $checkoutOnepage;
$this->customerOrderView = $customerOrderView;
$checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
$checkoutOnepage->getBillingBlock()->clickContinue();
$checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod(['method' => 'check_money_order']);
$checkoutOnepage->getPaymentMethodsBlock()->clickContinue();
$actualPrices = [];
$actualPrices = $this->getReviewPrices($actualPrices, $product);
$actualPrices = $this->getReviewTotals($actualPrices);
$prices = $this->preparePrices($prices);
//Order review prices verification
$message = 'Prices on order review should be equal to defined in dataset.';
\PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message);
$checkoutOnepage->getReviewBlock()->placeOrder();
$checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
$checkoutOnepageSuccess->getSuccessBlock()->openOrder();
$actualPrices = [];
$actualPrices = $this->getOrderPrices($actualPrices, $product);
$actualPrices = $this->getOrderTotals($actualPrices);
//Frontend order prices verification
$message = 'Prices on order view page should be equal to defined in dataset.';
\PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message);
}
开发者ID:shabbirvividads,项目名称:magento2,代码行数:36,代码来源:AbstractAssertTaxCalculationAfterCheckoutDownloadable.php
示例2: processAssert
/**
* Assert that prices on order review and customer order pages are equal to specified in dataset.
*
* @param array $prices
* @param InjectableFixture $product
* @param CheckoutCart $checkoutCart
* @param CheckoutOnepage $checkoutOnepage
* @param CheckoutOnepageSuccess $checkoutOnepageSuccess
* @param CustomerOrderView $customerOrderView
* @param CmsIndex $cmsIndex
* @return void
*/
public function processAssert(array $prices, InjectableFixture $product, CheckoutCart $checkoutCart, CheckoutOnepage $checkoutOnepage, CheckoutOnepageSuccess $checkoutOnepageSuccess, CustomerOrderView $customerOrderView, CmsIndex $cmsIndex)
{
$this->checkoutOnepage = $checkoutOnepage;
$this->customerOrderView = $customerOrderView;
$checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
$cmsIndex->getCmsPageBlock()->waitPageInit();
$shippingMethod = ['shipping_service' => 'Flat Rate', 'shipping_method' => 'Fixed'];
$checkoutOnepage->getShippingMethodBlock()->selectShippingMethod($shippingMethod);
$checkoutOnepage->getShippingMethodBlock()->clickContinue();
$checkoutOnepage->getPaymentBlock()->selectPaymentMethod(['method' => 'checkmo']);
$actualPrices = [];
$actualPrices = $this->getReviewPrices($actualPrices, $product);
$actualPrices = $this->getReviewTotals($actualPrices);
$prices = $this->preparePrices($prices);
//Order review prices verification
$message = 'Prices on order review should be equal to defined in dataset.';
\PHPUnit_Framework_Assert::assertEquals(array_diff_key($prices, ['cart_item_price_excl_tax' => null, 'cart_item_price_incl_tax' => null]), $actualPrices, $message);
$checkoutOnepage->getPaymentBlock()->placeOrder();
$checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
$checkoutOnepageSuccess->getSuccessBlock()->openOrder();
$actualPrices = [];
$actualPrices = $this->getOrderPrices($actualPrices, $product);
$actualPrices = $this->getOrderTotals($actualPrices);
//Frontend order prices verification
$message = 'Prices on order view page should be equal to defined in dataset.';
\PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, $message);
}
示例3: run
/**
* Proceed to checkout
*
* @return void
*/
public function run()
{
$this->checkoutCart->open();
$this->checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
}