當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。