function testMoneyForCodeCurrency() { $m = PriceRef::money_for_code_currency('a', 'EUR'); $this->assertEquals('€0.70 EUR', $m->show_with_code()); $m = PriceRef::money_for_code_currency('a', 'GBP'); $this->assertEquals('£0.50 GBP', $m->show_with_code()); }
function price_in($currency) { if (strval($this->me['pricecode']) == '') { return new Money(0, $currency); } return PriceRef::money_for_code_currency($this->me['pricecode'], $currency); }