public function testToString() { $eur = new Currency(CurrencyCode::EUR()); $this->assertSame('EUR', $eur->__toString()); }
/** * Returns a Money object * * @param Integer $amount Amount expressed in the smallest units of $currency (e.g. cents) * @param Currency $currency Currency of the money object */ public function __construct(Integer $amount, Currency $currency) { $baseCurrency = new BaseCurrency($currency->getCode()->toNative()); $this->money = new BaseMoney($amount->toNative(), $baseCurrency); $this->currency = $currency; }