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
CurrencySymbol
Test
Constraint
AssertCurrencySymbolOnProductPageCustomWebsite.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\CurrencySymbol\Test\Constraint
;
8
9
use Magento\Mtf\Fixture\InjectableFixture;
10
use Magento\Catalog\Test\Page\Product\CatalogProductView;
11
use Magento\Mtf\Client\BrowserInterface;
12
use Magento\Mtf\Constraint\AbstractConstraint;
13
17
class
AssertCurrencySymbolOnProductPageCustomWebsite
extends
AbstractConstraint
18
{
28
public
function
processAssert
(
29
InjectableFixture
$product
,
30
BrowserInterface $browser,
31
CatalogProductView $catalogProductView,
32
array
$currencySymbol
= []
33
) {
34
$website
=
$product
->getDataFieldConfig(
'website_ids'
)[
'source'
]->getWebsites()[0];
35
$url
= $_ENV[
'app_frontend_url'
] .
'websites/'
.
$website
->getCode() .
'/'
.
$product
->getUrlKey() .
'.html'
;
36
$browser->open(
$url
);
37
$priceBlock = $catalogProductView->getViewBlock()->getPriceBlock();
38
$symbolOnPage = $priceBlock->getCurrencySymbol();
39
40
\PHPUnit\Framework\Assert::assertEquals(
41
$currencySymbol
[
'customWebsite'
],
42
$symbolOnPage,
43
'Wrong Currency Symbol is displayed on Product page on Custom website.'
44
);
45
}
46
52
public
function
toString
()
53
{
54
return
"Correct Currency Symbol displayed on Product page on Custom website."
;
55
}
56
}
$url
$url
Definition:
query_redirect.php:14
Magento\CurrencySymbol\Test\Constraint\AssertCurrencySymbolOnProductPageCustomWebsite\processAssert
processAssert(InjectableFixture $product, BrowserInterface $browser, CatalogProductView $catalogProductView, array $currencySymbol=[])
Definition:
AssertCurrencySymbolOnProductPageCustomWebsite.php:28
$website
$website
Definition:
payment_configuration_rollback.php:38
$currencySymbol
$currencySymbol
Definition:
matrix.phtml:14
Magento\CurrencySymbol\Test\Constraint\AssertCurrencySymbolOnProductPageCustomWebsite
Definition:
AssertCurrencySymbolOnProductPageCustomWebsite.php:17
Magento\CurrencySymbol\Test\Constraint
Definition:
AssertCurrencySymbolOnCatalogPage.php:7
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\CurrencySymbol\Test\Constraint\AssertCurrencySymbolOnProductPageCustomWebsite\toString
toString()
Definition:
AssertCurrencySymbolOnProductPageCustomWebsite.php:52