ProophTest\ServiceBus\Plugin\Router\RegexRouterTest::it_matches_pattern_with_command_name_to_detect_appropriate_handler PHP Method

it_matches_pattern_with_command_name_to_detect_appropriate_handler() public method

    public function it_matches_pattern_with_command_name_to_detect_appropriate_handler()
    {
        $regexRouter = new RegexRouter();
        $regexRouter->route('/^' . preg_quote('ProophTest\\ServiceBus\\Mock\\Do') . '.*/')->to("DoSomethingHandler");
        $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\\ServiceBus\\Mock\\DoSomething']);
        $regexRouter->onRouteMessage($actionEvent);
        $this->assertEquals("DoSomethingHandler", $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLER));
    }