Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ObjectProphecy.php

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\Prophecy

Code

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];
}
RSS feed
Powered by Drupal