当前位置: 首页>>代码示例>>PHP>>正文


PHP CheckoutCart::getMessagesBlock方法代码示例

本文整理汇总了PHP中mage\checkout\test\page\CheckoutCart::getMessagesBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP CheckoutCart::getMessagesBlock方法的具体用法?PHP CheckoutCart::getMessagesBlock怎么用?PHP CheckoutCart::getMessagesBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mage\checkout\test\page\CheckoutCart的用法示例。


在下文中一共展示了CheckoutCart::getMessagesBlock方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAssert

 /**
  * Assert that product can be configured and added to cart after added this product to cart by sku.
  *
  * @param CheckoutCart $checkoutCart
  * @param CatalogProductView $catalogProductView
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, CatalogProductView $catalogProductView, array $requiredAttentionProducts)
 {
     foreach ($requiredAttentionProducts as $product) {
         $checkoutCart->open()->getAdvancedCheckoutCart()->clickSpecifyProductOptionsLink($product);
         $catalogProductView->getViewBlock()->addToCart($product);
         \PHPUnit_Framework_Assert::assertEquals(sprintf(self::SUCCESS_MESSAGE, $product->getName()), $checkoutCart->getMessagesBlock()->getSuccessMessages());
     }
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:16,代码来源:AssertProductConfiguringFromRequiringAttention.php

示例2: processAssert

 /**
  * Login to frontend. Create product. Adding product to shopping cart.
  *
  * @param CheckoutCart $checkoutCart
  * @param CatalogProductSimple $product
  * @param CmsIndex $cmsIndex
  * @param CustomerAccountLogout $customerAccountLogout
  * @param CatalogProductView $catalogProductView
  * @param Customer $customer
  * @param CustomerSegment $customerSegment
  * @param CustomerSegmentIndex $customerSegmentIndex
  * @param BrowserInterface $browser
  * @param CustomerSegmentNew $customerSegmentNew
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, CatalogProductSimple $product, CmsIndex $cmsIndex, CustomerAccountLogout $customerAccountLogout, CatalogProductView $catalogProductView, Customer $customer, CustomerSegment $customerSegment, CustomerSegmentIndex $customerSegmentIndex, BrowserInterface $browser, CustomerSegmentNew $customerSegmentNew)
 {
     $this->checkoutCart = $checkoutCart;
     $this->cmsIndex = $cmsIndex;
     $this->customerAccountLogout = $customerAccountLogout;
     $this->catalogProductView = $catalogProductView;
     $this->customer = $customer;
     $this->customerSegment = $customerSegment;
     $this->customerSegmentIndex = $customerSegmentIndex;
     $this->customerSegmentNew = $customerSegmentNew;
     $this->cmsIndex->open();
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $this->customer])->run();
     $product->persist();
     $this->checkoutCart->open()->getCartBlock()->clearShoppingCart();
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $this->catalogProductView->getViewBlock()->clickAddToCart();
     $this->checkoutCart->getMessagesBlock()->getSuccessMessages();
     $this->assert();
     $this->customerAccountLogout->open();
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:35,代码来源:AbstractAssertCustomerSegmentPriceRuleApplying.php

示例3: processAssert

 /**
  * Assert that success apply gift card message is displayed on shopping cart page.
  *
  * @param CheckoutCart $checkoutCart
  * @param GiftCardAccount $giftCardAccount
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, GiftCardAccount $giftCardAccount)
 {
     \PHPUnit_Framework_Assert::assertEquals(sprintf(self::SUCCESS_APPLY_MESSAGE, $giftCardAccount->getCode()), $checkoutCart->getMessagesBlock()->getSuccessMessages(), 'Wrong success message is displayed.');
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:11,代码来源:AssertGiftCardSuccessAddMessage.php

示例4: processAssert

 /**
  * Assert that success message is displayed after adding products by sku to shopping cart.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $products
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $products)
 {
     $productsQty = count($products);
     $qtyString = $productsQty > 1 ? 'products were' : 'product was';
     \PHPUnit_Framework_Assert::assertEquals(sprintf(self::SUCCESS_MESSAGE, $productsQty, $qtyString), $checkoutCart->getMessagesBlock()->getSuccessMessages());
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:13,代码来源:AssertProductsAddBySkuSuccessMessage.php

示例5: processAssert

 /**
  * Assert that product requires attention error message is displayed after adding products by sku to shopping cart.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $requiredAttentionProducts
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $requiredAttentionProducts)
 {
     $productsQty = count($requiredAttentionProducts);
     $qtyString = $productsQty > 1 ? 'products' : 'product';
     \PHPUnit_Framework_Assert::assertEquals(sprintf(self::ERROR_MESSAGE, $productsQty, $qtyString), $checkoutCart->getMessagesBlock()->getErrorMessages());
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AssertProductRequiredAttentionFailMessage.php


注:本文中的mage\checkout\test\page\CheckoutCart::getMessagesBlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。