Пример #1
0
 public function testGoodAssert()
 {
     $fsm = new Fsm('fsm');
     $fsm->setStates(array(new State('s1', true), new State('s2'), new State('s3')));
     $assert = new OneInitialStateAssert();
     $assert->validate($fsm);
 }
Пример #2
0
 public function validate(FsmInterface $fsm)
 {
     $v1 = new NoDuplicateStatesAssert();
     $v1->validate($fsm);
     $v2 = new NoDuplicateTransitionNamesAssert();
     $v2->validate($fsm);
     $v3 = new NoTransitionWithUndefinedStatesAssert();
     $v3->validate($fsm);
     $v4 = new OneInitialStateAssert();
     $v4->validate($fsm);
 }