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')); }