/** * @Then /^The state should be (.*)$/ */ public function theStateShouldBe($state) { $fsmState = $this->fsm->getState()->getId(); if ($fsmState !== $state) { throw new \Exception("FSM state is {$fsmState}. Not {$state}."); } }