File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/Symfony/Component/Workflow/Tests Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,23 @@ public function testCan()
104
104
105
105
$ this ->assertTrue ($ workflow ->can ($ subject , 't1 ' ));
106
106
$ this ->assertFalse ($ workflow ->can ($ subject , 't2 ' ));
107
+
108
+ $ subject ->marking = array ('b ' => 1 );
109
+
110
+ $ this ->assertFalse ($ workflow ->can ($ subject , 't1 ' ));
111
+ // In a workflow net, all "from" places should contain a token to enable
112
+ // the transition.
113
+ $ this ->assertFalse ($ workflow ->can ($ subject , 't2 ' ));
114
+
115
+ $ subject ->marking = array ('b ' => 1 , 'c ' => 1 );
116
+
117
+ $ this ->assertFalse ($ workflow ->can ($ subject , 't1 ' ));
118
+ $ this ->assertTrue ($ workflow ->can ($ subject , 't2 ' ));
119
+
120
+ $ subject ->marking = array ('f ' => 1 );
121
+
122
+ $ this ->assertFalse ($ workflow ->can ($ subject , 't5 ' ));
123
+ $ this ->assertTrue ($ workflow ->can ($ subject , 't6 ' ));
107
124
}
108
125
109
126
public function testCanWithGuard ()
You can’t perform that action at this time.
0 commit comments