/** * Converts the currency of "getSourceValue" if the currency is different * Uses Converter class * * @return Money */ public function getConvertedSourceValue() { $currency = $this->getCurrency(); $value = $this->getSourceValue(); if ($currency != $value->getCurrency()) { $value = Converter::get()->convert($value, $currency); } return $value; }
/** * @covers ::clear * @covers ::get * @expectedException LogicException * @expectedExceptionMessage Converter not initialized, call Converter::initialize(source) */ public function testClear() { Converter::clear(); Converter::get(); }