Ouzo\ControllerFactoryTest::shouldResolveAction PHP Method

shouldResolveAction() public method

public shouldResolveAction ( )
    public function shouldResolveAction()
    {
        //given
        $routeRule = new RouteRule('GET', '/simple_test/action1', 'simple_test', 'action1', false);
        $factory = $this->injector->getInstance('\\Ouzo\\ControllerFactory');
        $config = Config::getValue('global');
        $_SERVER['REQUEST_URI'] = "{$config['prefix_system']}/simple_test/action1";
        //when
        $currentController = $factory->createController($routeRule);
        //then
        $this->assertEquals('action1', $currentController->currentAction);
    }