function it_publish_event_on_all_delegate_bus(EventBus $eventBus1, EventBus $eventBus2, DomainEvent $event)
 {
     $this->beConstructedWith([$eventBus1, $eventBus2]);
     $eventBus1->publish($event)->shouldBeCalled();
     $eventBus2->publish($event)->shouldBeCalled();
     $this->publish($event);
 }
Example #2
0
 public function publish(DomainEvent $event)
 {
     $eventProperties = EventProperties::fromEvent($event);
     $this->logger->info(get_class($event), $eventProperties->getValues());
     $this->delegateEventBus->publish($event);
 }