/** * @test */ public function shouldReturnCorrectTransitionName() { $from = 'state-from'; $to = 'state-to'; $this->assertEquals($from . Utils::STATE_CONCATENATOR . $to, Utils::getTransitionName($from, $to)); }
/** * get the transition name. * the transition name is always unique for a statemachine * since it constists of <state_from>_to_<state_to> * * @return string */ public function getName() { $name = Utils::getTransitionName($this->getStateFrom()->getName(), $this->getStateTo()->getName()); return $name; }