function it_dispatches_before_and_after_events(EventDispatcherInterface $dispatcher)
{
$alias = 'be';
$subject = new \stdClass();
$arguments = array();
$dispatcher->dispatch('beforeExpectation', Argument::type('PhpSpec\\Event\\ExpectationEvent'))->shouldBeCalled();
$dispatcher->dispatch('afterExpectation', Argument::which('getResult', ExpectationEvent::PASSED))->shouldBeCalled();
$this->match($alias, $subject, $arguments);
}