/**
  * @param ActorCreated $actorCreated
  * @param DomainMessage $message
  */
 private function applyActorCreated(ActorCreated $actorCreated, DomainMessage $message)
 {
     $this->setLogContextFromDomainMessage($message);
     $xml = $this->getActorXml($actorCreated->getUrl());
     $enrichedActorCreated = ActorCreatedEnrichedWithCdbXml::fromActorCreated($actorCreated, $xml, new StringLiteral(\CultureFeed_Cdb_Xml::namespaceUriForVersion('3.3')));
     $this->publish($enrichedActorCreated, $message->getMetadata());
 }
 public static function fromActorCreated(ActorCreated $actorCreated, StringLiteral $cdbXml, StringLiteral $cdbXmlNamespaceUri)
 {
     return new self($actorCreated->getActorId(), $actorCreated->getTime(), $actorCreated->getAuthor(), $actorCreated->getUrl(), $cdbXml, $cdbXmlNamespaceUri);
 }
 /**
  * @dataProvider messagesProvider
  * @test
  * @param ActorUpdated|ActorCreated $incomingEvent
  * @param ActorUpdatedEnrichedWithCdbXml|ActorCreatedEnrichedWithCdbXml $newEvent
  */
 public function it_publishes_a_new_message_enriched_with_xml($incomingEvent, $newEvent)
 {
     $this->expectHttpClientToReturnCdbXmlFromUrl($incomingEvent->getUrl());
     $this->publish($incomingEvent);
     $this->assertTracedEvents([$newEvent]);
 }