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

Emit error when mocked method isn't really mocked #3127

Closed
sebastianbergmann opened this issue May 12, 2018 · 1 comment
Closed

Emit error when mocked method isn't really mocked #3127

sebastianbergmann opened this issue May 12, 2018 · 1 comment
Labels
feature/test-doubles Stubs and Mock Objects type/enhancement A new idea that should be implemented
Milestone

Comments

@sebastianbergmann
Copy link
Owner

Moved here from sebastianbergmann/phpunit-mock-objects#274.

@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented feature/test-doubles Stubs and Mock Objects labels May 12, 2018
MichelHartmann added a commit to MichelHartmann/phpunit that referenced this issue Sep 7, 2018
Only mark mocked methods as configurable
MichelHartmann added a commit to MichelHartmann/phpunit that referenced this issue Sep 7, 2018
Only mark mocked methods as configurable
MichelHartmann added a commit to MichelHartmann/phpunit that referenced this issue Sep 7, 2018


* Only mark mocked methods as configurable
* Test that you can only expect on configurable methods
sebastianbergmann pushed a commit that referenced this issue Sep 7, 2018
* Only mark mocked methods as configurable
* Test that you can only expect on configurable methods
@sebastianbergmann sebastianbergmann added this to the PHPUnit 7.4 milestone Sep 7, 2018
@Krinkle
Copy link

Krinkle commented Sep 27, 2018

@sebastianbergmann Would you accept a PR that ports this to PHPUnit 6?

aivus added a commit to aivus/doctrine2 that referenced this issue Oct 31, 2018
 - this mock didn't work well before because phpunit didn't mock method addDefaultDiscriminatorMap.
 - since phpunit 7.4.0 it throws warning in case of mocking method which is not really mocked (sebastianbergmann/phpunit#3127)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-doubles Stubs and Mock Objects type/enhancement A new idea that should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants