Skip to content

Commit 991956d

Browse files
committed
MTO-108: [Test] Observe Different Base Currency per Website
- Defects fixed
1 parent e2fda94 commit 991956d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ public function getPriceTo($currency = '$')
113113
/**
114114
* Get currency symbol from price block on the product page.
115115
*
116-
* @param string $currency
117-
* @return array|null
116+
* @return string
118117
*/
119-
public function getCurrencySymbol($currency = '$')
118+
public function getCurrencySymbol()
120119
{
121-
$price = $this->getPrice($currency);
120+
$price = $this->getPrice('');
122121
preg_match('`(.*?)\d`', $price, $matches);
123122
return $matches[1];
124123
}

dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Constraint/AssertCurrencySymbolOnProductPageCustomWebsite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function processAssert(
3535
$url = $_ENV['app_frontend_url'] . 'websites/' . $website->getCode() . '/' . $product->getUrlKey() . '.html';
3636
$browser->open($url);
3737
$priceBlock = $catalogProductView->getViewBlock()->getPriceBlock();
38-
$symbolOnPage = $priceBlock->getCurrencySymbol('');
38+
$symbolOnPage = $priceBlock->getCurrencySymbol();
3939

4040
\PHPUnit_Framework_Assert::assertEquals(
4141
$currencySymbol['customWebsite'],

dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/Constraint/AssertCurrencySymbolOnProductPageMainWebsite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function processAssert(
3333
) {
3434
$browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
3535
$priceBlock = $catalogProductView->getViewBlock()->getPriceBlock();
36-
$symbolOnPage = $priceBlock->getCurrencySymbol('');
36+
$symbolOnPage = $priceBlock->getCurrencySymbol();
3737

3838
\PHPUnit_Framework_Assert::assertEquals(
3939
$currencySymbol['mainWebsite'],

0 commit comments

Comments
 (0)