Beispiel #1
0
 public function test_that_create_returns_message_from_command()
 {
     $command = new RegisterUserCommand();
     $command->setFirstName('James')->setMiddleName('D')->setLastName('Smith')->setEmail('*****@*****.**')->setPassword('secret');
     $message = CommandMessage::create($command);
     /** @var RegisterUserCommand $payload */
     $payload = $message->payload();
     $this->assertSame('*****@*****.**', $payload->getEmail());
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function execute(Command $command)
 {
     $this->stack = clone $this->filters;
     $this->pipe(CommandMessage::create($command));
 }