izzum\statemachine\loader\JSONTest::shouldLoadTransitionsFromFile PHP Method

shouldLoadTransitionsFromFile() public method

    public function shouldLoadTransitionsFromFile()
    {
        $machine = new StateMachine(new Context(new Identifier('json-test', 'test-machine')));
        $this->assertCount(0, $machine->getTransitions());
        //this is a symbolic link to the assets/json/example.json file
        $loader = JSON::createFromFile(__DIR__ . '/fixture-example.json');
        $count = $loader->load($machine);
        $this->assertCount(4, $machine->getTransitions(), 'there is a regex transition that adds 2 transitions (a-c and b-c)');
        $this->assertEquals(4, $count);
    }