New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for guards when advancing workflow from a command #23906
Changes from 2 commits
b044ffb
324c208
8ab59cb
22b44e2
3a8b2ed
2ebc71a
92308b4
2c9d1e2
49839e3
8f2fa6b
fefc202
15fd863
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,20 @@ public function testWithSupportedEventAndAccept() | |
$this->assertTrue($event->isBlocked()); | ||
} | ||
|
||
public function testWithNoTokenStorage() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, there is a token storage but no token There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! |
||
{ | ||
$event = $this->createEvent(); | ||
$this->tokenStorage = null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this does not work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, thanks for your patience here. First time contributing! I'll get this done right away |
||
|
||
$this->listener->onTransition($event, 'event_name_a'); | ||
|
||
$this->assertFalse($event->isBlocked()); | ||
|
||
$this->listener->onTransition($event, 'event_name_b'); | ||
|
||
$this->assertTrue($event->isBlocked()); | ||
} | ||
|
||
private function createEvent() | ||
{ | ||
$subject = new \stdClass(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null === $token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.