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
AssertCartPriceRuleConditionIsNotApplied.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\SalesRule\Test\Constraint
;
8
12
class
AssertCartPriceRuleConditionIsNotApplied
extends
AssertCartPriceRuleApplying
13
{
19
protected
function
assert
()
20
{
21
$subTotal
= $this->checkoutCart->getTotalsBlock()->getSubtotal();
22
$grandTotal = $this->checkoutCart->getTotalsBlock()->getGrandTotal();
23
24
if
($this->checkoutCart->getTotalsBlock()->isVisibleShippingPriceBlock()) {
25
$shippingPrice
= $this->checkoutCart->getTotalsBlock()->getShippingPrice();
26
$grandTotal = number_format(($grandTotal -
$shippingPrice
), 2);
27
}
28
\PHPUnit\Framework\Assert::assertEquals(
29
$subTotal
,
30
$grandTotal,
31
'Shopping cart subtotal: \''
.
$subTotal
.
'\'
not equals with grand total: \
''
. $grandTotal .
'\''
32
);
33
}
34
40
public
function
toString
()
41
{
42
return
"Shopping cart subtotal equals to grand total - price rule has not been applied."
;
43
}
44
}
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleConditionIsNotApplied
Definition:
AssertCartPriceRuleConditionIsNotApplied.php:12
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleConditionIsNotApplied\toString
toString()
Definition:
AssertCartPriceRuleConditionIsNotApplied.php:40
$shippingPrice
$shippingPrice
Definition:
price.phtml:12
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleApplying
Definition:
AssertCartPriceRuleApplying.php:26
$subTotal
$subTotal
Definition:
order_express_with_tax.php:16
Magento\SalesRule\Test\Constraint\AssertCartPriceRuleConditionIsNotApplied\assert
assert()
Definition:
AssertCartPriceRuleConditionIsNotApplied.php:19
Magento\SalesRule\Test\Constraint
Definition:
AssertCartPriceRuleApplying.php:7