function ObjectProphecy::getMethodProphecies
Returns either all or related to single method prophecies.
@phpstan-return ($methodName is string ? list<MethodProphecy> : array<string, list<MethodProphecy>>)
Parameters
null|string $methodName:
Return value
MethodProphecy[]|array<string, MethodProphecy[]>
1 call to ObjectProphecy::getMethodProphecies()
- ObjectProphecy::__call in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php - Creates new method prophecy using specified method name and arguments.
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php, line 166
Class
- ObjectProphecy
- @author Konstantin Kudryashov <ever.zet@gmail.com>
Namespace
Prophecy\ProphecyCode
public function getMethodProphecies($methodName = null) {
if (null === $methodName) {
return $this->methodProphecies;
}
$methodName = strtolower($methodName);
if (!isset($this->methodProphecies[$methodName])) {
return array();
}
return $this->methodProphecies[$methodName];
}