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

Breadcrumb

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

function ObjectProphecy::addMethodProphecy

Adds method prophecy to object prophecy.

Parameters

MethodProphecy $methodProphecy:

Return value

void

File

vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php, line 146

Class

ObjectProphecy
@author Konstantin Kudryashov <ever.zet@gmail.com>

Namespace

Prophecy\Prophecy

Code

public function addMethodProphecy(MethodProphecy $methodProphecy) {
    $methodName = strtolower($methodProphecy->getMethodName());
    if (!isset($this->methodProphecies[$methodName])) {
        $this->methodProphecies[$methodName] = array();
    }
    $this->methodProphecies[$methodName][] = $methodProphecy;
}
RSS feed
Powered by Drupal