-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add helper method to set service mocks in the container. #646
base: master
Are you sure you want to change the base?
Conversation
Could you please apply the changes suggested by PHP-CS-Fixer ? |
doc/command.md
Outdated
@@ -46,4 +46,34 @@ class MyTestCase extends WebTestCase { | |||
} | |||
``` | |||
|
|||
If you need to mock a service in your command, you can use the `setServiceMock` method. |
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.
Does it work only for commands? Otherwise this text may be added here: https://github.com/liip/LiipFunctionalTestBundle/blob/master/doc/basic.md
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.
I'm not sure. It'll take some time to work on it.
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.
I've added more tests and documentation, about the non-obvious nuances of the setMockService method usage.
Co-authored-by: Alexis Lefebvre <[email protected]>
Handy helper to mock services in the container when doing command tests.