Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 function price_in($currency)
 {
     if (strval($this->me['pricecode']) == '') {
         return new Money(0, $currency);
     }
     return PriceRef::money_for_code_currency($this->me['pricecode'], $currency);
 }