You are here

public function MethodProphecy::willReturnArgument in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php \Prophecy\Prophecy\MethodProphecy::willReturnArgument()

Sets return argument promise to the prophecy.

Parameters

int $index The zero-indexed number of the argument to return:

Return value

$this

See also

Prophecy\Promise\ReturnArgumentPromise

File

vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php, line 177

Class

MethodProphecy
Method prophecy.

Namespace

Prophecy\Prophecy

Code

public function willReturnArgument($index = 0) {
  return $this
    ->will(new Promise\ReturnArgumentPromise($index));
}