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


PHP CheckoutCart::getGiftRegistryBlock方法代码示例

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


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

示例1: processAssert

 /**
  * Assert that product can be added to active gift registry from shopping cart.
  *
  * @param CatalogProductView $catalogProductView
  * @param CheckoutCart $checkoutCart
  * @param InjectableFixture $product
  * @param GiftRegistry $giftRegistry
  * @param GiftRegistryItems $giftRegistryItems
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, InjectableFixture $product, GiftRegistry $giftRegistry, GiftRegistryItems $giftRegistryItems, BrowserInterface $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->addToCart($product);
     $catalogProductView->getMessagesBlock()->waitSuccessMessage();
     $checkoutCart->open();
     $checkoutCart->getGiftRegistryBlock()->addToGiftRegistry($giftRegistry);
     \PHPUnit_Framework_Assert::assertTrue($giftRegistryItems->getGiftRegistryItemsBlock()->isProductInGrid($product), "Product can not be added to active gift registry '{$giftRegistry->getTitle()}' from shopping cart.");
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:20,代码来源:AssertGiftRegistryActiveInShoppingCart.php

示例2: processAssert

 /**
  * Assert that product can not be added to inactive gift registry from shopping cart.
  *
  * @param CatalogProductView $catalogProductView
  * @param CheckoutCart $checkoutCart
  * @param InjectableFixture $product
  * @param GiftRegistry $giftRegistry
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, InjectableFixture $product, GiftRegistry $giftRegistry, BrowserInterface $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->addToCart($product);
     \PHPUnit_Framework_Assert::assertFalse($checkoutCart->getGiftRegistryBlock()->isGiftRegistryAvailable($giftRegistry), "Product can be added to inactive gift registry '{$giftRegistry->getTitle()}' from shopping cart.");
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:16,代码来源:AssertGiftRegistryInactiveInShoppingCart.php


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