public andReturnUsing ( ) : self | ||
return | self |
public function andReturnUsing()
{
$this->_closureQueue = func_get_args();
return $this;
}
/** * WordPress testing function used to avoid return expectations on action hooks. * Throws exception for WordPress filters and generic PHP function testing. * * @param callable $callback * @return \Mockery\Expectation */ public function whenHappen(callable $callback) { if (!$this->isAddedHook && !$this->isAction) { throw new RuntimeException('whenHappen() can only be used for WordPress actions or added filters expectations.'); } return $this->expectation->andReturnUsing($callback); }