public function testAttachViaSharedEventManagerAndDispatch()
 {
     $callbackCalled = false;
     $sharedEventManager = Bootstrap::getServiceManager()->get('SharedEventManager');
     $sharedEventManager->attach('EventStore', PostPersistEvent::NAME, function (PostPersistEvent $e) use(&$callbackCalled) {
         $callbackCalled = true;
     });
     $this->eventManagerProxy->dispatch(PostPersistEvent::NAME, $this->getPostPersistEvent());
     $this->assertTrue($callbackCalled);
 }
 public function testCreateService()
 {
     $eventStore = Bootstrap::getServiceManager()->get('malocher.eventstore');
     $this->assertInstanceOf('Malocher\\EventStore\\EventStore', $eventStore);
     $this->assertInstanceOf('MalocherEventStoreModule\\EventDispatcher\\EventManagerProxy', $eventStore->events());
 }