/** * @dataProvider entryData */ public function testSetters($name, $value) { $tax = new Tax(); $tax->setName($name); $tax->setValue($value); $this->assertEquals($name, $tax->getName()); $this->assertEquals($value, $tax->getValue()); }
/** * @param float $grossValue * @return Price */ public function addGross($grossValue) { $gross = new Money($grossValue); $newGross = $this->getGross() + $gross->getValue(); return new Price($this->getTax()->calculateNett($newGross), $newGross, $this->getCurrencySymbol(), $this->tax->getValue()); }