function let(StateMachineInterface $sm) { $sm->getState()->willReturn('checkout'); $this->beConstructedWith($this->specs, $this->callable); }
function it_provide_sm_getState_function(FactoryInterface $factory, StateMachineInterface $stateMachine) { $this->getState($object = new DummyObject(), 'simple'); $factory->get($object, 'simple')->shouldHaveBeenCalled(); $stateMachine->getState()->shouldHaveBeenCalled(); }