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
SalesRule
Test
Constraint
AssertCartPriceRuleConditionIsApplied.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\SalesRule\Test\Constraint
;
8
12
class
AssertCartPriceRuleConditionIsApplied
extends
AssertCartPriceRuleApplying
13
{
19
protected
function
assert
()
20
{
21
$this->checkoutCart->getTotalsBlock()->waitForShippingPriceBlock();
22
$this->checkoutCart->getTotalsBlock()->waitForUpdatedTotals();
23
$actualPrices[
'sub_total'
] = $this->checkoutCart->getTotalsBlock()->getSubtotal();
24
$actualPrices[
'grand_total'
] = $this->checkoutCart->getTotalsBlock()->getGrandTotal();
25
$actualPrices[
'discount'
] = $this->checkoutCart->getTotalsBlock()->getDiscount();
26
$expectedPrices =
$this->cartPrice
;
27
28
\PHPUnit\Framework\Assert::assertEquals(
29
$expectedPrices,
30
$actualPrices,
31
'Wrong total cart prices are displayed.'
32
);
33
}
34
40
public
function
toString
()
41
{
42
return
"Shopping cart subtotal doesn't equal to grand total - price rule has been applied."
;
43
}
44
}
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleConditionIsApplied\toString
toString()
Definition:
AssertCartPriceRuleConditionIsApplied.php:40
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleApplying
Definition:
AssertCartPriceRuleApplying.php:26
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleConditionIsApplied\assert
assert()
Definition:
AssertCartPriceRuleConditionIsApplied.php:19
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleConditionIsApplied
Definition:
AssertCartPriceRuleConditionIsApplied.php:12
Magento\SalesRule\Test\Constraint
Definition:
AssertCartPriceRuleApplying.php:7
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleApplying\$cartPrice
$cartPrice
Definition:
AssertCartPriceRuleApplying.php:96