Source of file ShopCurrencyTest.php
Size: 0,598 Bytes - Last Modified: 2021-12-24T06:35:03+00:00
/var/www/docs.ssmods.com/process/src/tests/php/ORM/FieldType/ShopCurrencyTest.php
12345678910111213141516171819202122 | <?php namespace SilverShop\Tests\ORM\FieldType; use SilverShop\ORM\FieldType\ShopCurrency; use SilverStripe\Dev\SapphireTest; class ShopCurrencyTest extends SapphireTest { public function testField() { ShopCurrency::config()->currency_symbol = "X"; ShopCurrency::config()->decimal_delimiter = "|"; ShopCurrency::config()->thousand_delimiter = "-"; ShopCurrency::config()->negative_value_format = "- %s"; $field = new ShopCurrency("Price"); $field->setValue(-12345.56); $this->assertEquals("- X12-345|56", $field->Nice()); } } |