class StateMachineValidatorTest extends TestCase
{ public function testWithMultipleTransitionWithSameNameShareInput() { $this->
expectException(InvalidDefinitionException::
class);
$this->
expectExceptionMessage('A transition from a place/state must have an unique name.'
);
$places =
['a', 'b', 'c'
];
$transitions[] =
new Transition('t1', 'a', 'b'
);
$transitions[] =
new Transition('t1', 'a', 'c'
);
$definition =
new Definition($places,
$transitions);
(new StateMachineValidator())->
validate($definition, 'foo'
);
// The graph looks like:
//
// +----+ +----+ +---+
// | a | --> | t1 | --> | b |
// +----+ +----+ +---+
// |
// |
// v
// +----+ +----+
// | t1 | --> | c |