Skip to content

Instantly share code, notes, and snippets.

@mageekguy
Created July 11, 2012 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mageekguy/3089522 to your computer and use it in GitHub Desktop.
Save mageekguy/3089522 to your computer and use it in GitHub Desktop.
public function test__construct_which_should_accept_event_dispatcher_as_an_argument()
{
$this
->if($dispatcher = new \mock\Symfony\Component\EventDispatcher\EventDispatcherInterface())
->and($runner = new PHPSpectZ\Runner($dispatcher))
->then
->object($runner->getEventDispatcher())->isIdenticalTo($dispatcher)
;
// work fine too
$dispatcher = new \mock\Symfony\Component\EventDispatcher\EventDispatcherInterface();
$runner = new PHPSpectZ\Runner($dispatcher);
$this->object($runner->getEventDispatcher())->isIdenticalTo($dispatcher)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment