File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1313use Prooph \EventSourcing \AggregateChanged ;
1414use Prooph \EventSourcing \AggregateRoot ;
1515use Prooph \EventSourcing \EventStoreIntegration \AggregateTranslator ;
16+ use Prooph \EventStore \Aggregate \AggregateType ;
1617
1718/**
1819 * Class TestCase
@@ -35,6 +36,19 @@ protected function popRecordedEvent(AggregateRoot $aggregateRoot)
3536 return $ this ->getAggregateTranslator ()->extractPendingStreamEvents ($ aggregateRoot );
3637 }
3738
39+ /**
40+ * @param string $aggregateRootClass
41+ * @param array $events
42+ * @return object
43+ */
44+ protected function reconstituteAggregateFromHistory ($ aggregateRootClass , array $ events )
45+ {
46+ return $ this ->getAggregateTranslator ()->reconstituteAggregateFromHistory (
47+ AggregateType::fromAggregateRootClass ($ aggregateRootClass ),
48+ $ events
49+ );
50+ }
51+
3852 /**
3953 * @return AggregateTranslator
4054 */
You can’t perform that action at this time.
0 commit comments