public function testSubtract() { $amount100 = new Amount('100'); $amount50 = $amount100->subtract(new Amount('50')); $this->assertSame('100', $amount100->getString(0)); $this->assertSame('50', $amount50->getString(0)); }
/** * Get new Amount with the value of $amount subtracted from instance * * @param Amount $amount * @param integer $precision * @return Amount */ public function subtract(Amount $amount, $precision = -1) { $this->validateCurrency($amount); return parent::subtract($amount, $precision); }