Пример #1
0
 function it_should_remove_shipment_properly(ShipmentInterface $shipment)
 {
     $shipment->setOrder($this)->shouldBeCalled();
     $this->addShipment($shipment);
     $this->hasShipment($shipment)->shouldReturn(true);
     $shipment->setOrder(null)->shouldBeCalled();
     $this->removeShipment($shipment);
     $this->hasShipment($shipment)->shouldReturn(false);
 }
Пример #2
0
 function it_adds_and_removes_shipments(ShipmentInterface $shipment)
 {
     $shipment->setOrder($this)->shouldBeCalled();
     $this->addShipment($shipment);
     $this->shouldHaveShipment($shipment);
     $shipment->setOrder(null)->shouldBeCalled();
     $this->removeShipment($shipment);
     $this->shouldNotHaveShipment($shipment);
 }