8000 [2.7] fix mocks by xabbuh · Pull Request #18307 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Mar 25, 2016
Merged

[2.7] fix mocks #18307

merged 1 commit into from
Mar 25, 2016

Conversation

xabbuh
Copy link
Member
@xabbuh xabbuh commented Mar 25, 2016
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

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

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.

Copy link
Member

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)

Copy link
Member

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).

@nicolas-grekas
Copy link
Member

Looks like there are more to fix :)

@xabbuh
Copy link
Member Author
xabbuh commented Mar 25, 2016

Rebasing to include the changes from #18306 should be enough. Let's see if Travis and AppVeyor agree.

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

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

@xabbuh
Copy link
Member Author
xabbuh commented Mar 25, 2016

The Travis build succeeded, AppVeyor seemed to time out before actually running any test.

@fabpot
Copy link
Member
fabpot commented Mar 25, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit d9be1b4 into symfony:2.7 Mar 25, 2016
fabpot added a commit that referenced this pull request Mar 25, 2016
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
@xabbuh xabbuh deleted the fix-mocks-2.7 branch March 25, 2016 17:44
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.

5 participants
0