function it_returns_subtotal_which_consist_of_discounted_unit_price_multiplied_by_quantity(OrderItemUnitInterface $firstUnit, OrderItemUnitInterface $secondUnit) { $this->setUnitPrice(10000); $firstUnit->getOrderItem()->willReturn($this); $firstUnit->getTotal()->willReturn(9000); $firstUnit->getAdjustmentsTotal(AdjustmentInterface::ORDER_UNIT_PROMOTION_ADJUSTMENT)->willReturn(-500); $secondUnit->getOrderItem()->willReturn($this); $secondUnit->getTotal()->willReturn(9000); $secondUnit->getAdjustmentsTotal(AdjustmentInterface::ORDER_UNIT_PROMOTION_ADJUSTMENT)->willReturn(-500); $this->addUnit($firstUnit); $this->addUnit($secondUnit); $this->getSubtotal()->shouldReturn(19000); }