Skip to content

Commit ddfd72e

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: [Workflow] Fix test
2 parents 06bcb03 + 322648c commit ddfd72e

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

Tests/Validator/StateMachineValidatorTest.php

+3-17
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,13 @@ public function testValid()
116116

117117
public function testWithTooManyInitialPlaces()
118118
{
119-
$this->expectException(InvalidDefinitionException::class);
120-
$this->expectExceptionMessage('The state machine "foo" cannot store many places. But the definition has 2 initial places. Only one is supported.');
121119
$places = range('a', 'c');
122120
$transitions = [];
123121
$definition = new Definition($places, $transitions, ['a', 'b']);
124122

125-
(new StateMachineValidator())->validate($definition, 'foo');
126-
127-
// the test ensures that the validation does not fail (i.e. it does not throw any exceptions)
128-
$this->addToAssertionCount(1);
123+
$this->expectException(InvalidDefinitionException::class);
124+
$this->expectExceptionMessage('The state machine "foo" cannot store many places. But the definition has 2 initial places. Only one is supported.');
129125

130-
// The graph looks like:
131-
//
132-
// +----+ +----+ +---+
133-
// | a | --> | t1 | --> | b |
134-
// +----+ +----+ +---+
135-
// |
136-
// |
137-
// v
138-
// +----+ +----+
139-
// | t2 | --> | c |
140-
// +----+ +----+
126+
(new StateMachineValidator())->validate($definition, 'foo');
141127
}
142128
}

0 commit comments

Comments
 (0)