Exemple #1
0
 /**
  * Retrieves a formatted string representation
  *
  * @param string $locale The locale
  *
  * @return string
  */
 public function format(string $locale = 'en_US') : string
 {
     return LocaleFormatter::fromLocale($locale)->format($this);
 }
 public function test_that_format_returns_expected_output_for_locale()
 {
     $formatter = LocaleFormatter::fromLocale('en_US');
     $this->assertSame('$1,100.75', $formatter->format(Money::USD(110075)));
 }