izzum\statemachine\utils\UtilsTest::shouldPassConfigurationCheckForMachineWithGoodCallables PHP Method

shouldPassConfigurationCheckForMachineWithGoodCallables() public method

https://github.com/rolfvreijdenberger/izzum-statemachine/issues/7
    public function shouldPassConfigurationCheckForMachineWithGoodCallables()
    {
        $transitions = array();
        $s1 = new State("1");
        $s1->setEntryCallable('phpinfo');
        $s2 = new State("2");
        $s2->setEntryCallable('phpinfo');
        $s3 = new State("3");
        $s3->setEntryCallable('phpinfo');
        $transitions[] = new Transition($s1, $s2);
        $transitions[] = new Transition($s2, $s3);
        foreach ($transitions as $transition) {
            $transition->setGuardCallable('phpinfo');
            $transition->setTransitionCallable('phpinfo');
        }
        $loader = new LoaderArray($transitions);
        $context = new Context(new Identifier(Identifier::NULL_ENTITY_ID, Identifier::NULL_STATEMACHINE));
        $machine = new StateMachine($context);
        $loader->load($machine);
        Utils::checkConfiguration($machine);
        $this->assertTrue(true, 'basic machine with good callables will be configured correctly');
    }