public function Prophet::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Prophet.php \Prophecy\Prophet::__construct()
Initializes Prophet.
Parameters
null|Doubler $doubler:
null|RevealerInterface $revealer:
null|StringUtil $util:
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophet.php, line 48
Class
- Prophet
- Prophet creates prophecies.
Namespace
ProphecyCode
public function __construct(Doubler $doubler = null, RevealerInterface $revealer = null, StringUtil $util = null) {
if (null === $doubler) {
$doubler = new Doubler();
$doubler
->registerClassPatch(new ClassPatch\SplFileInfoPatch());
$doubler
->registerClassPatch(new ClassPatch\TraversablePatch());
$doubler
->registerClassPatch(new ClassPatch\DisableConstructorPatch());
$doubler
->registerClassPatch(new ClassPatch\ProphecySubjectPatch());
$doubler
->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch());
$doubler
->registerClassPatch(new ClassPatch\HhvmExceptionPatch());
$doubler
->registerClassPatch(new ClassPatch\MagicCallPatch());
$doubler
->registerClassPatch(new ClassPatch\KeywordPatch());
}
$this->doubler = $doubler;
$this->revealer = $revealer ?: new Revealer();
$this->util = $util ?: new StringUtil();
}