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
CatalogRule
Test
Constraint
AssertCatalogPriceRuleNotAppliedCatalogPage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CatalogRule\Test\Constraint
;
8
9
use Magento\Cms\Test\Page\CmsIndex;
10
use Magento\Mtf\Constraint\AbstractConstraint;
11
use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
12
16
class
AssertCatalogPriceRuleNotAppliedCatalogPage
extends
AbstractConstraint
17
{
26
public
function
processAssert
(
27
CmsIndex $cmsIndexPage,
28
CatalogCategoryView $catalogCategoryViewPage,
29
array
$products
30
) {
31
$cmsIndexPage->open();
32
foreach
(
$products
as
$product
) {
33
$categoryName =
$product
->getCategoryIds()[0];
34
$cmsIndexPage->getTopmenu()->selectCategoryByName($categoryName);
35
$priceBlock = $catalogCategoryViewPage->getListProductBlock()->getProductItem(
$product
)->getPriceBlock();
36
\PHPUnit\Framework\Assert::assertFalse(
37
$priceBlock->isSpecialPriceVisible(),
38
"Catalog price rule is applied!\n"
39
);
40
}
41
}
42
48
public
function
toString
()
49
{
50
return
'Catalog price rule was not applied to products on catalog page.'
;
51
}
52
}
Magento\CatalogRule\Test\Constraint
Definition:
AssertCatalogPriceRuleAppliedCatalogPage.php:6
Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleNotAppliedCatalogPage\toString
toString()
Definition:
AssertCatalogPriceRuleNotAppliedCatalogPage.php:48
$products
$products
Definition:
products_for_search.php:14
Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleNotAppliedCatalogPage
Definition:
AssertCatalogPriceRuleNotAppliedCatalogPage.php:16
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\CatalogRule\Test\Constraint\AssertCatalogPriceRuleNotAppliedCatalogPage\processAssert
processAssert(CmsIndex $cmsIndexPage, CatalogCategoryView $catalogCategoryViewPage, array $products)
Definition:
AssertCatalogPriceRuleNotAppliedCatalogPage.php:26