You are here

public function ObjectProphecy::getMethodProphecies in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php \Prophecy\Prophecy\ObjectProphecy::getMethodProphecies()

Returns either all or related to single method prophecies.

Parameters

null|string $methodName:

Return value

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 165

Class

ObjectProphecy
Object prophecy.

Namespace

Prophecy\Prophecy

Code

public function getMethodProphecies($methodName = null) {
  if (null === $methodName) {
    return $this->methodProphecies;
  }
  if (!isset($this->methodProphecies[$methodName])) {
    return array();
  }
  return $this->methodProphecies[$methodName];
}