Skip to content

Commit 322648c

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: [Workflow] Fix test
2 parents a2a506b + b93c436 commit 322648c

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

Tests/Validator/StateMachineValidatorTest.php

Lines changed: 3 additions & 17 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy