/** * 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 testDefaultCacheDriver() { $config = new Configuration(); $cache = $config->getMetadataCache(); $this->assertInstanceOf('Doctrine\\Common\\Cache\\Cache', $cache); }