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

Breadcrumb

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

function CannotUseAddMethodsException::__construct

Overrides Exception::__construct

File

vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/CannotUseAddMethodsException.php, line 21

Class

CannotUseAddMethodsException
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Framework\MockObject\Generator

Code

public function __construct(string $type, string $methodName) {
    parent::__construct(sprintf('Trying to configure method "%s" with addMethods(), but it exists in class "%s". Use onlyMethods() for methods that exist in the class', $methodName, $type));
}
RSS feed
Powered by Drupal