Skip to content

Instantly share code, notes, and snippets.

@jubianchi
Created November 27, 2015 19:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jubianchi/bccecaf95a72c89b0732 to your computer and use it in GitHub Desktop.
<?php
require_once __DIR__ . '/vendor/autoload.php';
$className = uniqid();
$prophet = new \Prophecy\Prophet();
$prophetProphecy = $prophet->prophesize('Prophecy\Prophet');
$objectProphecy = $prophet->prophesize('Prophecy\Prophecy\ObjectProphecy');
$prophetProphecy->prophesize($className)->willReturn($objectProphecy->reveal());
var_dump($prophetProphecy->reveal()->prophesize($className)); // NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment