@@ -124,7 +124,7 @@ public function testWorkflowApplyTransitionActionWorkflowNotFound()
124
124
$ this ->admin ->getObject (42 )->shouldBeCalledTimes (1 )
125
125
->willReturn ($ subject = new PullRequest ());
126
126
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
127
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
127
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
128
128
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
129
129
130
130
$ this ->controller ()->workflowApplyTransitionAction ($ this ->request );
@@ -144,7 +144,7 @@ public function testWorkflowApplyTransitionActionMissingTransition()
144
144
$ this ->admin ->getObject (42 )->shouldBeCalledTimes (1 )
145
145
->willReturn ($ subject = new PullRequest ());
146
146
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
147
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
147
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
148
148
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
149
149
150
150
$ this ->controller ()->workflowApplyTransitionAction ($ this ->request );
@@ -167,7 +167,7 @@ public function testWorkflowApplyTransitionActionTransitionException()
167
167
->willReturn ($ subject = new PullRequest ());
168
168
$ this ->admin ->toString ($ subject )->shouldBeCalledTimes (1 )->willReturn ('pr42 ' );
169
169
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
170
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
170
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
171
171
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
172
172
173
173
$ this ->controller ()->workflowApplyTransitionAction ($ this ->request );
@@ -189,7 +189,7 @@ public function testWorkflowApplyTransitionActionModelManagerException()
189
189
$ this ->admin ->getObject (42 )->shouldBeCalledTimes (1 )
190
190
->willReturn ($ subject = new PullRequest ());
191
191
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
192
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
192
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
193
193
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
194
194
$ this ->admin ->update ($ subject )->shouldBeCalledTimes (1 )->willThrow (new ModelManagerException ('phpunit error ' ));
195
195
@@ -213,7 +213,7 @@ public function testWorkflowApplyTransitionActionLockException()
213
213
$ this ->admin ->generateObjectUrl ('edit ' , $ subject )->shouldBeCalledTimes (1 )
214
214
->willReturn ('/pull-request/42/edit ' );
215
215
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
216
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
216
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
217
217
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
218
218
$ this ->admin ->hasRoute ('edit ' )->shouldBeCalledTimes (1 )->willReturn (false );
219
219
$ this ->admin ->hasRoute ('show ' )->shouldBeCalledTimes (1 )->willReturn (false );
@@ -248,7 +248,7 @@ public function testWorkflowApplyTransitionActionSuccessXmlHttp()
248
248
->willReturn ($ subject = new PullRequest ());
249
249
$ this ->admin ->toString ($ subject )->shouldBeCalledTimes (1 )->willReturn ('pr42 ' );
250
250
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
251
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
251
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
252
252
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
253
253
$ this ->admin ->update ($ subject )->shouldBeCalledTimes (1 )->willReturn ($ subject );
254
254
@@ -276,7 +276,7 @@ public function testWorkflowApplyTransitionActionSuccessHttp()
276
276
->willReturn ($ subject = new PullRequest ());
277
277
$ this ->admin ->toString ($ subject )->shouldBeCalledTimes (1 )->willReturn ('pr42 ' );
278
278
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
279
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
279
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
280
280
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
281
281
$ this ->admin ->hasRoute ('edit ' )->shouldBeCalledTimes (1 )->willReturn (false );
282
282
$ this ->admin ->hasRoute ('show ' )->shouldBeCalledTimes (1 )->willReturn (false );
@@ -311,7 +311,7 @@ public function testWorkflowApplyTransitionActionPreApply()
311
311
$ this ->admin ->getObject (42 )->shouldBeCalledTimes (1 )
312
312
->willReturn ($ subject = new PullRequest ());
313
313
$ this ->admin ->setSubject ($ subject )->shouldBeCalledTimes (1 );
314
- $ this ->admin ->checkAccess ('edit ' , $ subject )->shouldBeCalledTimes (1 );
314
+ $ this ->admin ->checkAccess ('applyTransitions ' , $ subject )->shouldBeCalledTimes (1 );
315
315
$ this ->admin ->getNormalizedIdentifier ($ subject )->shouldBeCalledTimes (1 )->willReturn (42 );
316
316
$ this ->admin ->update ($ subject )->shouldNotBeCalled ();
317
317
0 commit comments