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

Codeception\Util\Stub documentation invalid #31

Open
mikk150 opened this issue Apr 19, 2017 · 3 comments
Open

Codeception\Util\Stub documentation invalid #31

mikk150 opened this issue Apr 19, 2017 · 3 comments

Comments

@mikk150
Copy link

mikk150 commented Apr 19, 2017

Codeception\Util\Stub::atLeastOnce(), Codeception\Util\Stub::exactly(), Codeception\Util\Stub::never(), Codeception\Util\Stub::once() examples do not show, that in order for those methods to work, you have to insert \Codeception\Test\Unit

@Naktibalda
Copy link
Member

Please update it and make a pull request.
However I advice against using Stub, use PhpUnit mocking features or any other mocking framework.

@DavertMik
Copy link
Member

I think it was a mistake to accept PR which adds mocking into Stub class.
Stub should make stubs only, everything other is evil 👿
Use proper mocking framework for mocks.

@mikk150
Copy link
Author

mikk150 commented Apr 20, 2017

I actually like Codeception Stub more than PhpUnit Mock because it is easier to use

@Naktibalda Naktibalda transferred this issue from Codeception/Codeception Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants