Пример #1
0
 /**
  * EntityDomainEvent constructor.
  *
  * @param IdInterface $aggregateId
  */
 public function __construct(IdInterface $aggregateId)
 {
     parent::__construct();
     $this->aggregateId = $aggregateId;
 }
Пример #2
0
 /**
  * PrePersistEvent constructor.
  *
  * @param EventSourcedAggregateRootInterface $aggregate
  */
 public function __construct(EventSourcedAggregateRootInterface $aggregate)
 {
     parent::__construct();
     $this->aggregate = $aggregate;
 }
Пример #3
0
 /**
  * Test OccurredOn method.
  */
 public function testOccurredOn()
 {
     $this->given($event = new DomainEvent())->then()->object($event->occurredOn())->isInstanceOf(\DateTime::class);
 }