/** * Returns the Currency object * * @param Money $money * @return \Money\Currency */ public function getCurrency(Money $money) { return $this->moneyFormatter->getCurrency($money); }
/** * Returns the symbol corresponding to the given currency * * @param Currency $currency * @return string */ public function symbol(Currency $currency) { return $this->moneyFormatter->formatCurrencyAsSymbol($currency); }
public function testGetCurrency() { $value = $this->formatter->getCurrency($this->inputMoney); $this->assertInstanceOf('Money\\Currency', $value); $this->assertEquals(new Currency('EUR'), $value); }