Files
Twig/extra/intl-extra/Tests/Fixtures/format_currency.test
Fabien Potencier 1868918724 Move things around
2021-01-01 15:53:48 +01:00

17 lines
406 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--TEST--
"format_currency" filter
--TEMPLATE--
{{ '1000000'|format_currency('EUR') }}
{{ '1000000'|format_currency('EUR', locale='de') }}
{{ '1000000'|format_currency('EUR', {fraction_digit: 2}) }}
{{ '12.345'|format_currency('EUR', {rounding_mode: 'floor'}) }}
{{ '125000'|format_currency('YEN') }}
--DATA--
return [];
--EXPECT--
€1,000,000.00
1.000.000,00 €
€1,000,000.00
€12.34
YEN 125,000.00