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
GroupedProduct
Test
Constraint
AbstractAssertPriceOnGroupedProductPage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\GroupedProduct\Test\Constraint
;
8
9
use
Magento\Catalog\Test\Constraint\AssertPriceOnProductPageInterface
;
10
use
Magento\Catalog\Test\Fixture\CatalogProductSimple
;
11
use Magento\Catalog\Test\Page\Product\CatalogProductView;
12
use
Magento\GroupedProduct\Test\Fixture\GroupedProduct
;
13
use Magento\Mtf\Client\BrowserInterface;
14
use Magento\Mtf\Constraint\AbstractConstraint;
15
19
abstract
class
AbstractAssertPriceOnGroupedProductPage
extends
AbstractConstraint
20
{
26
protected
$errorMessage
;
27
33
protected
$successfulMessage
;
34
45
protected
function
processAssertPrice(
46
GroupedProduct
$product
,
47
CatalogProductView $catalogProductView,
48
AssertPriceOnProductPageInterface
$object,
49
BrowserInterface $browser,
50
$typePrice =
''
51
) {
52
$browser->open($_ENV[
'app_frontend_url'
] .
$product
->getUrlKey() .
'.html'
);
53
54
$groupedData =
$product
->getAssociated();
56
foreach
($groupedData[
'products'
] as $key => $subProduct) {
57
//Process assertions
58
$catalogProductView->getGroupedProductViewBlock()->{
'item'
. $typePrice .
'PriceProductBlock'
}(++$key);
59
$object->
setErrorMessage
(sprintf($this->errorMessage, $subProduct->getData(
'name'
)));
60
$object->
assertPrice
($subProduct, $catalogProductView->getGroupedProductViewBlock(),
'Grouped'
);
61
}
62
}
63
69
public
function
toString
()
70
{
71
return
$this->successfulMessage;
72
}
73
}
Magento\GroupedProduct\Test\Constraint\AbstractAssertPriceOnGroupedProductPage
Definition:
AbstractAssertPriceOnGroupedProductPage.php:19
Magento\GroupedProduct\Test\Constraint
Definition:
AbstractAssertPriceOnGroupedProductPage.php:7
Magento\GroupedProduct\Test\Constraint\AbstractAssertPriceOnGroupedProductPage\toString
toString()
Definition:
AbstractAssertPriceOnGroupedProductPage.php:69
Magento\Catalog\Test\Fixture\CatalogProductSimple
Definition:
CustomAttribute.php:7
Magento\GroupedProduct\Test\Fixture\GroupedProduct
Definition:
Associated.php:7
Magento\Catalog\Test\Constraint\AssertPriceOnProductPageInterface
Definition:
AssertPriceOnProductPageInterface.php:16
Magento\GroupedProduct\Test\Constraint\AbstractAssertPriceOnGroupedProductPage\$successfulMessage
$successfulMessage
Definition:
AbstractAssertPriceOnGroupedProductPage.php:33
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Catalog\Test\Constraint\AssertPriceOnProductPageInterface\setErrorMessage
setErrorMessage($errorMessage)
Magento\GroupedProduct\Test\Constraint\AbstractAssertPriceOnGroupedProductPage\$errorMessage
$errorMessage
Definition:
AbstractAssertPriceOnGroupedProductPage.php:26
Magento\Catalog\Test\Constraint\AssertPriceOnProductPageInterface\assertPrice
assertPrice(FixtureInterface $product, View $productViewBlock)