Ejemplo n.º 1
0
 /**
  * @covers ::total
  * @uses Blesta\Pricing\Type\UnitPrice::__construct
  * @uses Blesta\Pricing\Type\UnitPrice::setPrice
  * @uses Blesta\Pricing\Type\UnitPrice::setQty
  * @uses Blesta\Pricing\Type\UnitPrice::setKey
  */
 public function testTotal()
 {
     $price = 5.0;
     $qty = 2;
     $unit_price = new UnitPrice($price, $qty);
     $this->assertEquals($qty * $price, $unit_price->total());
 }
Ejemplo n.º 2
0
 /**
  * Retrieves the total item price amount not considering discounts or taxes
  *
  * @return float The item subtotal
  */
 public function subtotal()
 {
     return parent::total();
 }