Elgg\ActionsServiceTest::createService PHP Метод

createService() публичный Метод

public createService ( )
    function createService()
    {
        _elgg_services()->setValue('systemMessages', $this->system_messages);
        // we don't want system messages propagating across tests
        _elgg_services()->setValue('actions', $this->actions);
        _elgg_services()->setValue('hooks', $this->hooks);
        _elgg_services()->setValue('request', $this->request);
        _elgg_services()->setValue('translator', $this->translator);
        $this->amd_config = _elgg_services()->amdConfig;
        $this->ajax = new Service($this->hooks, $this->system_messages, $this->input, $this->amd_config);
        _elgg_services()->setValue('ajax', $this->ajax);
        $transport = new \Elgg\Http\OutputBufferTransport();
        $this->response_factory = new ResponseFactory($this->request, $this->hooks, $this->ajax, $transport);
        _elgg_services()->setValue('responseFactory', $this->response_factory);
        // register page handlers
        elgg_register_page_handler('action', '_elgg_action_handler');
    }
ActionsServiceTest