本文整理匯總了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());
}