public function testAddASubscriberService() {
$event = new Event();
$service = $this
->getMock('Symfony\\Component\\EventDispatcher\\Tests\\SubscriberService');
$service
->expects($this
->once())
->method('onEvent')
->with($event);
$container = new Container();
$container
->set('service.subscriber', $service);
$dispatcher = new ContainerAwareEventDispatcher($container);
$dispatcher
->addSubscriberService('service.subscriber', 'Symfony\\Component\\EventDispatcher\\Tests\\SubscriberService');
$dispatcher
->dispatch('onEvent', $event);
}