Skip to content
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

Merged
merged 1 commit into from Jun 24, 2017
Merged

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 24, 2017

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.

$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'));
Copy link
Member

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');
Copy link
Member

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.
@fabpot
Copy link
Member

fabpot commented Jun 24, 2017

Thank you @xabbuh.

@fabpot fabpot merged commit ddf4368 into symfony:3.3 Jun 24, 2017
fabpot added a commit that referenced this pull request Jun 24, 2017
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
@xabbuh xabbuh deleted the firewall-map-tests branch June 24, 2017 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants