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
Catalog
Test
Constraint
AssertProductCompareRemoveLastProductMessage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Catalog\Test\Constraint
;
8
9
use Magento\Catalog\Test\Page\Product\CatalogProductCompare;
10
use Magento\Mtf\Constraint\AbstractConstraint;
11
16
class
AssertProductCompareRemoveLastProductMessage
extends
AbstractConstraint
17
{
18
const
SUCCESS_MESSAGE
=
'You have no items to compare.'
;
19
26
public
function
processAssert
(CatalogProductCompare $comparePage)
27
{
28
$comparePage->open();
29
$actualMessage = $comparePage->getCompareProductsBlock()->getEmptyMessage();
30
\PHPUnit\Framework\Assert::assertEquals(
31
self::SUCCESS_MESSAGE,
32
$actualMessage,
33
'Wrong success message is displayed.'
34
.
"\nExpected: "
. self::SUCCESS_MESSAGE
35
.
"\nActual: "
. $actualMessage
36
);
37
}
38
44
public
function
toString
()
45
{
46
return
'After removing last product the message appears on "Compare Products" page.'
;
47
}
48
}
Magento\Catalog\Test\Constraint\AssertProductCompareRemoveLastProductMessage\SUCCESS_MESSAGE
const SUCCESS_MESSAGE
Definition:
AssertProductCompareRemoveLastProductMessage.php:18
Magento\Catalog\Test\Constraint\AssertProductCompareRemoveLastProductMessage
Definition:
AssertProductCompareRemoveLastProductMessage.php:16
Magento\Catalog\Test\Constraint
Definition:
AssertAbsenceDeleteAttributeButton.php:7
Magento\Catalog\Test\Constraint\AssertProductCompareRemoveLastProductMessage\processAssert
processAssert(CatalogProductCompare $comparePage)
Definition:
AssertProductCompareRemoveLastProductMessage.php:26
Magento\Catalog\Test\Constraint\AssertProductCompareRemoveLastProductMessage\toString
toString()
Definition:
AssertProductCompareRemoveLastProductMessage.php:44