Codeception / Stub

Flexible Stub wrapper for PHPUnit's Mock Builder
MIT License
295 stars 17 forks source link

Codeception\Util\Stub documentation invalid #31

Open mikk150 opened 7 years ago

mikk150 commented 7 years ago

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 commented 7 years ago

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

DavertMik commented 7 years ago

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

mikk150 commented 7 years ago

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