ProophTest\ServiceBus\Mock\CustomMessageBus::dispatch PHP Method

dispatch() public method

public dispatch ( mixed $message )
$message mixed
    public function dispatch($message)
    {
        $this->initialize($message, $this->getActionEvent());
    }

Usage Example

 /**
  * @test
  */
 public function it_uses_type_of_message_as_message_name_if_message_is_neither_object_nor_string()
 {
     $messageBus = new CustomMessageBus();
     $messageBus->dispatch([]);
     $this->assertSame('array', $messageBus->getActionEvent()->getParam(MessageBus::EVENT_PARAM_MESSAGE_NAME));
 }