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
respect the API in FirewallContext map #23287
Conversation
$firewallContext = $this->getMockBuilder(FirewallContext::class)->disableOriginalConstructor()->getMock(); | ||
$firewallContext->expects($this->once())->method('getConfig')->willReturn('CONFIG'); | ||
$firewallContext->expects($this->once())->method('getListeners')->willReturn('LISTENERS'); | ||
$firewallContext->expects($this->once())->method('getExceptionListener')->willReturn('EXCEPTION LISTENER'); | ||
$firewallContext->expects($this->once())->method('getListeners')->willReturn(array('LISTENERS')); |
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.
To fulfil the contract array('LISTENERS')
should be an array of ListenerInterface
instances
@@ -57,10 +58,11 @@ public function testGetListeners() | |||
{ | |||
$request = new Request(); | |||
|
|||
$exceptionListener = $this->getMockBuilder(ExceptionListener::class)->disableOriginalConstructor()->getMock(); | |||
$firewallContext = $this->getMockBuilder(FirewallContext::class)->disableOriginalConstructor()->getMock(); | |||
$firewallContext->expects($this->once())->method('getConfig')->willReturn('CONFIG'); |
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.
same here, should return a FirewallConfig
instance
When being merged up, this will make the SecurityBundle tests on master green again.
a03f25d
to
ddf4368
Compare
Thank you @xabbuh. |
This PR was merged into the 3.3 branch. Discussion ---------- respect the API in FirewallContext map | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | When being merged up, this will make the SecurityBundle tests on master green again. Commits ------- ddf4368 respect the API in FirewallContext map
When being merged up, this will make the SecurityBundle tests on master
green again.