Beispiel #1
0
 public function monetaryValueInPercentage($percent)
 {
     $money = Money::fromCent($this->attributes['price'] * 100);
     return $money->partsPercent($percent);
 }
Beispiel #2
0
 public function testShouldThePercentValueAmount()
 {
     $money = Money::fromFloat(11.25);
     $this->assertEquals(0.6, $money->partsPercent(5));
 }