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)
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
c
d
e
f
g
h
i
m
p
r
s
t
u
+
Functions
_
c
d
e
f
g
h
i
m
p
r
s
t
u
Variables
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
+
Functions
_
c
d
e
f
g
m
o
r
s
t
v
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
vendor
magento
magento2-base
dev
tests
functional
tests
app
Magento
Bundle
Test
Constraint
AssertBundlePriceCalculatedOnProductPage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Bundle\Test\Constraint
;
8
9
use
Magento\Bundle\Test\Fixture\BundleProduct
;
10
use Magento\Catalog\Test\Page\Product\CatalogProductView;
11
use
Magento\Catalog\Test\TestStep\ConfigureProductOnProductPageStep
;
12
use Magento\Mtf\Constraint\AbstractConstraint;
13
use Magento\Mtf\TestStep\TestStepFactory;
14
18
class
AssertBundlePriceCalculatedOnProductPage
extends
AbstractConstraint
19
{
27
public
function
processAssert
(
28
TestStepFactory $stepFactory,
29
BundleProduct
$product
,
30
CatalogProductView $catalogProductView
31
) {
32
$stepFactory->create(ConfigureProductOnProductPageStep::class, [
'product'
=>
$product
])->run();
33
34
//Process assertions
35
$this->
assertPrice
($product, $catalogProductView);
36
}
37
45
protected
function
assertPrice
(BundleProduct
$product
, CatalogProductView $productView)
46
{
47
$checkoutData =
$product
->getCheckoutData();
48
\PHPUnit\Framework\Assert::assertEquals(
49
$checkoutData[
'cartItem'
][
'configuredPrice'
],
50
$productView->getBundleViewBlock()->getBundleSummaryBlock()->getConfiguredPriceBlock()->getPrice(),
51
'Bundle price calculated is not correct.'
52
);
53
}
54
60
public
function
toString
()
61
{
62
return
'Bundle price calculates right on product view page.'
;
63
}
64
}
Magento\Catalog\Test\TestStep\ConfigureProductOnProductPageStep
Definition:
ConfigureProductOnProductPageStep.php:17
Magento\Bundle\Test\Constraint\AssertBundlePriceCalculatedOnProductPage\processAssert
processAssert(TestStepFactory $stepFactory, BundleProduct $product, CatalogProductView $catalogProductView)
Definition:
AssertBundlePriceCalculatedOnProductPage.php:27
Magento\Bundle\Test\Constraint
Definition:
AssertBundleInCategory.php:7
Magento\Bundle\Test\Constraint\AssertBundlePriceCalculatedOnProductPage\toString
toString()
Definition:
AssertBundlePriceCalculatedOnProductPage.php:60
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Bundle\Test\Constraint\AssertBundlePriceCalculatedOnProductPage
Definition:
AssertBundlePriceCalculatedOnProductPage.php:18
Magento\Bundle\Test\Fixture\BundleProduct
Definition:
BundleSelections.php:7
Magento\Bundle\Test\Constraint\AssertBundlePriceCalculatedOnProductPage\assertPrice
assertPrice(BundleProduct $product, CatalogProductView $productView)
Definition:
AssertBundlePriceCalculatedOnProductPage.php:45