function it_decorates_expectation_with_broken_event(Expectation $expectation, EventDispatcherInterface $dispatcher)
{
$alias = 'be';
$subject = new \stdClass();
$arguments = array();
$expectation->match(Argument::cetera())->willThrow('\\RuntimeException');
$dispatcher->dispatch('beforeExpectation', Argument::type('PhpSpec\\Event\\ExpectationEvent'))->shouldBeCalled();
$dispatcher->dispatch('afterExpectation', Argument::which('getResult', ExpectationEvent::BROKEN))->shouldBeCalled();
$this->shouldThrow('\\RuntimeException')->duringMatch($alias, $subject, $arguments);
}