function it_resolves_order_states_with_state_machine_event(StateResolverInterface $stateResolver, TransitionEvent $event, OrderInterface $order, StateMachineInterface $sm) { $event->getStateMachine()->willReturn($sm); $sm->getObject()->willReturn($order); $stateResolver->resolveShippingState($order)->shouldBeCalled(); $stateResolver->resolvePaymentState($order)->shouldBeCalled(); $this->resolveOrderStatesOnTransition($event); }
/** * @param OrderInterface $order */ protected function resolve(OrderInterface $order) { $this->stateResolver->resolvePaymentState($order); $this->stateResolver->resolveShippingState($order); }