/**
  * 
  * @return EntityManager
  */
 private function getManager()
 {
     $config = new Configuration();
     $config->setMetadataCacheImpl(new ArrayCache());
     $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), __DIR__ . '/../Mocks/Entity/'));
     $em = new EntityManager($this->getMock('Pasinter\\OHM\\Storage\\StorageInterface'), $config);
     $cmFactory = new ClassMetadataFactory();
     $cmFactory->setEntityManager($em);
     return $em;
 }
 public function test_getMetadataFor()
 {
     $cmFactory = new ClassMetadataFactory();
     $emConfig = new Configuration();
     $emConfig->setEntityNamespaces(['PasinterMocks' => 'Pasinter\\Mocks\\Entity']);
     $emConfig->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), __DIR__ . '/../../Mocks/Entity/'));
     $emConfig->setMetadataCacheImpl(new ArrayCache());
     $cmFactory->setEntityManager(new EntityManager($this->getMock('Pasinter\\OHM\\Storage\\StorageInterface'), $emConfig));
     $cmFactory->getAllMetadata();
     $this->assertInstanceOf('Pasinter\\OHM\\Mapping\\ClassMetadata', $cmFactory->getMetadataFor('PasinterMocks:Blog\\Post'));
 }
 public function testMetadataCacheImpl()
 {
     $config = new Configuration();
     $config->setMetadataCacheImpl(new ArrayCache());
     $this->assertInstanceOf('Doctrine\\Common\\Cache\\ArrayCache', $config->getMetadataCacheImpl());
 }