public function testSetRepositoryMap()
 {
     $config = new Configuration();
     $map = array('Malocher\\EventStoreTest\\Coverage\\Mock\\EmptyEventSourcedObject' => 'Malocher\\EventStore\\Repository\\EventSourcingRepository');
     $config->setRepositoryMap($map);
     $this->assertEquals($map, $config->getRepositoryMap());
 }
示例#2
0
 /**
  * Construct
  * 
  * @param Configuration $config
  */
 public function __construct(Configuration $config)
 {
     $this->adapter = $config->getAdapter();
     $this->lookupSnapshots = $config->isSnapshotLookup();
     $this->autoGenerateSnapshots = $config->isAutoGenerateSnapshots();
     $this->snapshotInterval = $config->getSnapshotInterval();
     $this->repositoryMap = $config->getRepositoryMap();
     $this->eventDispatcher = $config->getEventDispatcher();
     if ($this->autoGenerateSnapshots) {
         $this->lookupSnapshots = true;
     }
 }