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