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