/** * {@inheritdoc} */ public function process(CommandMessage $message, callable $next) { /** @var Command $command */ $command = $message->payload(); $this->commandBus->execute($command); }
/** * {@inheritdoc} */ public function process(CommandMessage $message, callable $next) { $command = $message->payload(); $handler = $this->resolver->resolve($command); $handler->handle($command); }
public function test_that_payload_returns_expected_instance() { $data = ['prefix' => null, 'first_name' => 'James', 'middle_name' => 'D', 'last_name' => 'Smith', 'suffix' => null, 'email' => '*****@*****.**', 'password' => '$2y$10$NXQfVDFu3.Tyd97bnm4TPO/jdrbgL918xeXM5USqfB.qIHFB6mgjC']; $this->assertSame($data, $this->message->payload()->toArray()); }