Beispiel #1
0
 function storeEvents($assert)
 {
     $store = new MemoryEventStore();
     $application = new CommandQueryApplication($store);
     $application->handle(new Foo2('that'));
     $assert($store->allEvents(), [new Fooed('that happened')]);
 }
Beispiel #2
0
 function projectEvents($assert)
 {
     $store = new MemoryEventStore();
     $application = new CommandQueryApplication($store);
     $store->append(new Fooed5('that happened'), 'foo');
     $bar = $application->handle(new Bar());
     $assert($bar->fooed, ['So that happened']);
 }