Beispiel #1
0
 /**
  * @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());
 }
Beispiel #2
0
 /**
  * @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());
 }