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

Breadcrumb

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

function Prophet::__construct

File

vendor/phpspec/prophecy/src/Prophecy/Prophet.php, line 46

Class

Prophet
Prophet creates prophecies.

Namespace

Prophecy

Code

public function __construct(?Doubler $doubler = null, ?RevealerInterface $revealer = null, ?StringUtil $util = null) {
    if (null === $doubler) {
        $doubler = new CachedDoubler();
        $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch());
        $doubler->registerClassPatch(new ClassPatch\TraversablePatch());
        $doubler->registerClassPatch(new ClassPatch\ThrowablePatch());
        $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch());
        $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch());
        $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch());
        $doubler->registerClassPatch(new ClassPatch\MagicCallPatch());
        $doubler->registerClassPatch(new ClassPatch\KeywordPatch());
    }
    $this->doubler = $doubler;
    $this->revealer = $revealer ?: new Revealer();
    $this->util = $util ?: new StringUtil();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal