/** * Create a new EntityManager * * @param Storage $storageDriver * @param Configuration $config */ public function __construct(Storage $storageDriver, Configuration $config) { $cmf = new ClassMetadataFactory($config->getMappingDriverImpl()); $cmf->setCacheDriver($config->getMetadataCache()); $this->unitOfWork = new UnitOfWork($cmf, $storageDriver, $config); $this->storageDriver = $storageDriver; }
public function testNoMappingDriver() { $config = new Configuration(); $this->setExpectedException('Doctrine\\KeyValueStore\\KeyValueStoreException', 'No mapping driver was assigned to the configuration. Use $config->setMappingDriverImpl()'); $config->getMappingDriverImpl(); }