phpmock\MockBuilder::setFunction PHP 메소드

setFunction() 공개 메소드

Use this method if you want to set the mocked behaviour with a callable. Alternatively, you can use {@link setFunctionProvider()} to set it with a {@link FunctionProvider}.
또한 보기: setFunctionProvider()
public setFunction ( callable $function ) : MockBuilder
$function callable The mock function.
리턴 MockBuilder
    public function setFunction(callable $function)
    {
        $this->function = $function;
        return $this;
    }