Simplified will return #147

Merged
merged 3 commits into from Dec 12, 2013

Conversation

Projects
None yet
3 participants
@fabian
Contributor

fabian commented Dec 12, 2013

As proposed in #144 by @ciaranmcnulty and @whatthejeff here's another PR for a simplified use of will($this->returnValue($value)):

$stub->method('doSomething')->willReturn(...);
$stub->method('doSomething')->willReturnMap(...);
$stub->method('doSomething')->willReturnArgument(...);
$stub->method('doSomething')->willReturnCallback(...);
$stub->method('doSomething')->willReturnSelf(...);
$stub->method('doSomething')->willReturnOnConsecutiveCalls(...);
$stub->method('doSomething')->willThrowException(...);

whatthejeff added a commit that referenced this pull request Dec 12, 2013

@whatthejeff whatthejeff merged commit a1a2f93 into sebastianbergmann:master Dec 12, 2013

1 check passed

default The Travis CI build passed
Details
@whatthejeff

This comment has been minimized.

Show comment Hide comment
@whatthejeff

whatthejeff Dec 12, 2013

Collaborator

Looks great! Thanks @fabian and @ciaranmcnulty :)

Collaborator

whatthejeff commented Dec 12, 2013

Looks great! Thanks @fabian and @ciaranmcnulty :)

@fabian fabian deleted the fabian:willReturn branch Dec 12, 2013

@whatthejeff whatthejeff referenced this pull request in sebastianbergmann/phpunit-documentation Dec 12, 2013

Closed

Document `$stub->method()->willReturn*()`. #168

@ciaranmcnulty

This comment has been minimized.

Show comment Hide comment
@ciaranmcnulty

ciaranmcnulty Dec 13, 2013

Contributor

Awesome stuff ;-)

Contributor

ciaranmcnulty commented Dec 13, 2013

Awesome stuff ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment