function ObjectProphecy::reveal
Reveals double.
@phpstan-return T
Return value
object
Throws
\Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface
Overrides ProphecyInterface::reveal
1 call to ObjectProphecy::reveal()
- ObjectProphecy::checkProphecyMethodsPredictions in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php - Checks that registered method predictions do not fail.
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php, line 122
Class
- ObjectProphecy
- @author Konstantin Kudryashov <ever.zet@gmail.com>
Namespace
Prophecy\ProphecyCode
public function reveal() {
$double = $this->lazyDouble
->getInstance();
if (!$double instanceof ProphecySubjectInterface) {
throw new ObjectProphecyException("Generated double must implement ProphecySubjectInterface, but it does not.\n" . 'It seems you have wrongly configured doubler without required ClassPatch.', $this);
}
$double->setProphecy($this);
return $double;
}