-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.7] fix mocks #18307
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
[2.7] fix mocks #18307
Conversation
@@ -11,7 +11,7 @@ | |||
*/ | |||
|
|||
// Please update when phpunit needs to be reinstalled with fresh deps: | |||
// Cache-Id-Version: 2016-03-23 14:50 UTC | |||
// Cache-Id-Version: 2016-03-25 09:44 UTC |
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.
Actually, we do not really need this change here as it is also done in #18306 which is required here to also fix the mocks that are also wrong in the 2.3
branch.
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.
you only need to change it here when you change the file (i.e. when reverting the requirement on 3.1.1. mocks)
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.
@xabbuh can you please rebase your PR on latest 2.7 (with 2.3 just merged) and put here the same value as in 2.3? (I did not merge the cache-id change in 2.7 to not break it, this PR will, once tests are green).
Looks like there are more to fix :) |
Rebasing to include the changes from #18306 should be enough. Let's see if Travis and AppVeyor agree. |
@@ -55,7 +55,7 @@ public function testEventIsIgnoredIfUsernameIsNotPassedWithTheRequest() | |||
$this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue(null)); | |||
|
|||
$this->event->expects($this->never())->method('setResponse'); | |||
$this->securityContext->expects($this->never())->method('setToken'); | |||
$this->tokenStorage->expects($this->never())->method('setToken'); |
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.
this will fix the conflict during merging 2.3
into 2.7
The Travis build succeeded, AppVeyor seemed to time out before actually running any test. |
Thank you @xabbuh. |
This PR was merged into the 2.7 branch. Discussion ---------- [2.7] fix mocks | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | * check for existance of `setMetadataFactory()` method (this is needed for tests run with deps=high as the method was removed in Symfony 3.0) * fix mock testing the `EngineInterface` as the `stream()` method cannot be mocked when it is does not exist in the mocked interface Commits ------- d9be1b4 fix mocks
setMetadataFactory()
method (this is neededfor tests run with deps=high as the method was removed in Symfony
3.0)
EngineInterface
as thestream()
method cannotbe mocked when it is does not exist in the mocked interface