Kraken\_Unit\Channel\Router\RouterTest::testApiHandle_PassesArgumentsToRuleHandler PHP Method

testApiHandle_PassesArgumentsToRuleHandler() public method

    public function testApiHandle_PassesArgumentsToRuleHandler()
    {
        $router = $this->createRouter();
        $matcher = function () {
            return true;
        };
        $name = 'name';
        $protocol = $this->createProtocol();
        $flags = 1;
        $success = function () {
        };
        $failure = function () {
        };
        $abort = function () {
        };
        $timeout = 2.0;
        $callable = $this->createCallableMock();
        $callable->expects($this->once())->method('__invoke')->with($name, $protocol, $flags, $success, $failure, $abort, $timeout);
        $router->addRule($matcher, $callable);
        $router->handle($name, $protocol, $flags, $success, $failure, $abort, $timeout);
    }