Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
functional
tests
app
Magento
Checkout
Test
Constraint
AssertProductPresentInShoppingCart.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Checkout\Test\Constraint
;
8
9
use Magento\Checkout\Test\Page\CheckoutCart;
10
use Magento\Mtf\Constraint\AbstractConstraint;
11
16
class
AssertProductPresentInShoppingCart
extends
AbstractConstraint
17
{
25
public
function
processAssert
(
CheckoutCart
$checkoutCart, array
$products
)
26
{
27
$checkoutCart->open();
28
foreach
(
$products
as
$product
) {
29
\PHPUnit\Framework\Assert::assertTrue(
30
$checkoutCart->getCartBlock()->getCartItem(
$product
)->isVisible(),
31
'Product '
.
$product
->getName() .
' is absent in shopping cart.'
32
);
33
}
34
}
35
41
public
function
toString
()
42
{
43
return
'All expected products are present in shopping cart.'
;
44
}
45
}
Magento\Checkout\Test\Constraint\AssertProductPresentInShoppingCart\toString
toString()
Definition:
AssertProductPresentInShoppingCart.php:41
Magento\Checkout\Test\Constraint\AssertProductPresentInShoppingCart\processAssert
processAssert(CheckoutCart $checkoutCart, array $products)
Definition:
AssertProductPresentInShoppingCart.php:25
Magento\Checkout\Model\Cart
Definition:
CartInterface.php:6
$products
$products
Definition:
products_for_search.php:14
Magento\Checkout\Test\Constraint
Definition:
AssertAddedProductToCartSuccessMessage.php:7
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Checkout\Test\Constraint\AssertProductPresentInShoppingCart
Definition:
AssertProductPresentInShoppingCart.php:16