Elgg\RouterTest::setUp PHP Méthode

setUp() public méthode

public setUp ( )
    function setUp()
    {
        $this->pages = dirname(dirname(__FILE__)) . '/test_files/pages';
        $this->fooHandlerCalls = 0;
        $session = ElggSession::getMock();
        _elgg_services()->setValue('session', $session);
        _elgg_services()->session->start();
        $config = $this->config();
        _elgg_services()->setValue('config', $config);
        $this->input = new Input();
        _elgg_services()->setValue('input', $this->input);
        $this->request = $this->prepareHttpRequest('', 'GET');
        _elgg_services()->setValue('request', $this->request);
        $this->translator = new Translator();
        $this->translator->addTranslation('en', ['__test__' => 'Test']);
        $this->hooks = new PluginHooksService();
        $this->router = new Router($this->hooks);
        $this->system_messages = new SystemMessagesService(elgg_get_session());
        $this->viewsDir = dirname(dirname(__FILE__)) . "/test_files/views";
        $this->createService();
        _elgg_services()->logger->disable();
    }
RouterTest