sebastianbergmann/phpunit-mock-objects — pull request #146 by ciaranmcnulty (2013-12-03 16:44:40+00:00)
Title: Ability to call ::method() on a Stub without calling ::expects()

When using a Test Double as a Stub, we don't typically care whether it is actually called. Currently the mocking library forces the test author to specify an expectation of how many times the method will be called. This makes it harder to visually scan source code to see which Doubles have expectations set, and which don't care.

This change allows calls like:

$stub->method('foo')->will($this->returnValue('bar'));

This is clearer to identify as Stubbing behaviour.