-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAGETWO-85659: 6965: \Magento\Directory\Model\PriceCurrency::format()…
… fails without conversion rate #1022
- Loading branch information
Showing
2 changed files
with
71 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
dev/tests/integration/testsuite/Magento/Directory/Model/PriceCurrencyTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Directory\Model; | ||
|
||
use Magento\TestFramework\Helper\Bootstrap; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* Provide tests for PriceCurrency model. | ||
*/ | ||
class PriceCurrencyTest extends TestCase | ||
{ | ||
/** | ||
* Test subject. | ||
* | ||
* @var PriceCurrency | ||
*/ | ||
private $priceCurrency; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function setUp() | ||
{ | ||
$this->priceCurrency = Bootstrap::getObjectManager()->get(PriceCurrency::class); | ||
} | ||
|
||
/** | ||
* Check PriceCurrency::format() doesn't depend on currency rate configuration. | ||
* @return void | ||
*/ | ||
public function testFormat() | ||
{ | ||
self::assertSame( | ||
'<span class="price">AFN10.00</span>', | ||
$this->priceCurrency->format(10, true, 2, null, 'AFN') | ||
); | ||
} | ||
} |