You are here

function CurrencyWebTestCase::testFormat in Currency 7.2

Test format().

File

currency/tests/CurrencyWebTestCase.test, line 35
Contains class CurrencyWebTestCase.

Class

CurrencyWebTestCase
Tests class Currency.

Code

function testFormat() {
  $currency = currency_load('EUR');
  $amount = 12345.6789;
  $formatted = $currency
    ->format($amount);
  $formatted_expected = '€12,345.6789';
  $this
    ->assertEqual($formatted, $formatted_expected, 'Currency::format() correctly formats an amount.');
}