Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security] simplify the SwitchUserListenerTest#22049
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
GuilhemN left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Except my question, 👍
| $this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token)); | ||
| $this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba')); | ||
| $this->request->query->expects($this->once())->method('remove','_switch_user'); |
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.
isn't this missing in the new test?
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.
We check later on that the query parameter bag is empty.
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.
Ok i missed that 👍
fabpot commentedMar 22, 2017
Thank you@xabbuh. |
This PR was merged into the 2.7 branch.Discussion----------[Security] simplify the SwitchUserListenerTest| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |While working on#22048 I noticed that the `SwitchUserListenerTest` was more complicated than necessary by mocking a lot of stuff that didn't need to be mocked.Commits-------923bbdb [Security] simplify the SwitchUserListenerTest
While working on#22048 I noticed that the
SwitchUserListenerTestwas more complicated than necessary by mocking a lot of stuff that didn't need to be mocked.