function its_calculated_value_should_be_an_integer(ShipmentInterface $shipment)
 {
     $configuration = array('first_item_cost' => 1090, 'additional_item_cost' => 200, 'additional_item_limit' => 3);
     $shipment->getShippingItemCount()->willReturn(6);
     $this->calculate($shipment, $configuration)->shouldBeInteger();
 }
예제 #2
0
 function it_should_calculate_the_first_and_every_additional_item_cost_taking_limit_into_account(ShipmentInterface $shipment)
 {
     $configuration = array('first_item_cost' => 1500, 'additional_item_cost' => 300, 'additional_item_limit' => 3);
     $shipment->getShippingItemCount()->willReturn(8);
     $this->calculate($shipment, $configuration)->shouldReturn(2400);
 }