/** * Checks to see if this value is less than or equal to the one passed * * @throws fValidationException When `$money` is not a valid number/monetary value * * @param fMoney|string|integer $money The money object to compare to - a string or integer will be converted to the default currency (if defined) * @return boolean If this value is less than or equal to the one passed */ public function lte($money) { $money = $this->makeMoney($money); return $this->amount->lte($money->convert($this->currency)->amount); }
/** * @dataProvider invalidNumProvider * @expectedException fValidationException */ public function testLteFail($number) { $num = new fNumber('1'); $num->lte($number); }