The yaml string can contain one or more machine definitions. The correct machine will be found from the yaml structure. This class provides a way to load yaml from a file on your file system (fast access). This class needs the php yaml module to operate, which can be found via php.net
Inheritance: implements izzum\statemachine\loader\Loader
 /**
  * @test
  */
 public function shouldLoadTransitionsFromYAMLString()
 {
     $machine = new StateMachine(new Context(new Identifier('yaml-test', 'yaml-machine')));
     $this->assertCount(0, $machine->getTransitions());
     $yaml = $this->getYAML();
     $loader = new YAML($yaml);
     $this->assertEquals($this->getYAML(), $loader->getYAML());
     $count = $loader->load($machine);
     $this->assertCount(2, $machine->getTransitions());
     $this->assertEquals(2, $count);
     $tbd = $machine->getTransition('b_to_done');
     $b = $tbd->getStateFrom();
     $d = $tbd->getStateTo();
     $tab = $machine->getTransition('a_to_b');
     $a = $tab->getStateFrom();
     $this->assertEquals($b, $tab->getStateTo());
     $this->assertSame($b, $tab->getStateTo());
     $this->assertTrue($a->isInitial());
     $this->assertTrue($b->isNormal());
     $this->assertTrue($d->isFinal());
 }