/**
  * @param ObjectAdapterManager $oma
  */
 public function __construct(ObjectAdapterManager $oma)
 {
     $this->objectAdapterManager = $oma;
     $this->configuration = $this->objectAdapterManager->getConfiguration();
     $this->setCacheDriver($this->configuration->getMetadataCacheImpl());
     $this->driver = $this->configuration->getMetadataDriverImpl();
     $this->evm = $this->objectAdapterManager->getEventManager();
 }
 public function testLoadClassMetadataEvent()
 {
     $listener = new Listener();
     $evm = $this->objectAdapterManager->getEventManager();
     $evm->addEventListener(array(Event::loadClassMetadata), $listener);
     $meta = $this->getMetadataFor('Doctrine\\Tests\\ORM\\ODMAdapter\\Mapping\\Driver\\Model\\ReferenceMappingObject');
     $this->assertTrue($listener->called);
     $this->assertSame($this->objectAdapterManager, $listener->oma);
     $this->assertSame($meta, $listener->meta);
 }
 /**
  * @param ObjectAdapterManager $objectAdapterManager
  */
 public function __construct(ObjectAdapterManager $objectAdapterManager)
 {
     $this->objectAdapterManager = $objectAdapterManager;
     $this->eventManager = $objectAdapterManager->getEventManager();
     $this->eventListenersInvoker = new ListenersInvoker($objectAdapterManager);
 }
 /**
  * Initializes a new ListenersInvoker instance.
  *
  * @param ObjectAdapterManager $objectAdapterManager
  */
 public function __construct(ObjectAdapterManager $objectAdapterManager)
 {
     $this->eventManager = $objectAdapterManager->getEventManager();
     $this->objectAdapterManager = $objectAdapterManager;
 }