當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpbb_test_case::setUp方法代碼示例

本文整理匯總了PHP中phpbb_test_case::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpbb_test_case::setUp方法的具體用法?PHP phpbb_test_case::setUp怎麽用?PHP phpbb_test_case::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phpbb_test_case的用法示例。


在下文中一共展示了phpbb_test_case::setUp方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->test = new mpv_tests_modx(new mpv());
     $this->test->modx_object = new phpbb_mock_modx_object();
     $this->version = new phpbb_mock_modx_version();
 }
開發者ID:phpbb,項目名稱:mpv,代碼行數:7,代碼來源:modx_test.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->user = new \phpbb\user('\\phpbb\\datetime');
     $this->user->data = array('user_lang' => 'en');
     $this->user->add_lang('common');
 }
開發者ID:Voxel37,項目名稱:phpbb,代碼行數:7,代碼來源:generate_string_list.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $filesystem = new \phpbb\filesystem\filesystem();
     $this->set_phpbb_root_path($filesystem);
     $this->path_helper = new \phpbb\path_helper(new \phpbb\symfony_request(new phpbb_mock_request()), new \phpbb\filesystem\filesystem(), $this->getMock('\\phpbb\\request\\request'), $this->phpbb_root_path, 'php');
 }
開發者ID:MrAdder,項目名稱:phpbb,代碼行數:7,代碼來源:path_helper_test.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     global $config, $user, $request;
     $user = new phpbb_mock_user();
     $request = new phpbb_mock_request();
 }
開發者ID:phpbb,項目名稱:phpbb,代碼行數:7,代碼來源:make_clickable_test.php

示例5: setUp

    public function setUp()
    {
        parent::setUp();
        if (!self::$install_success) {
            $this->fail('Installing phpBB has failed.');
        }
        $this->bootstrap();
        self::$cookieJar = new CookieJar();
        self::$client = new Goutte\Client(array(), null, self::$cookieJar);
        // Clear the language array so that things
        // that were added in other tests are gone
        $this->lang = array();
        $this->add_lang('common');
        $db = $this->get_db();
        foreach (static::setup_extensions() as $extension) {
            $this->purge_cache();
            $sql = 'SELECT ext_active
				FROM ' . EXT_TABLE . "\n\t\t\t\tWHERE ext_name = '" . $db->sql_escape($extension) . "'";
            $result = $db->sql_query($sql);
            $status = (bool) $db->sql_fetchfield('ext_active');
            $db->sql_freeresult($result);
            if (!$status) {
                $this->install_ext($extension);
            }
        }
    }
開發者ID:007durgesh219,項目名稱:phpbb,代碼行數:26,代碼來源:phpbb_functional_test_case.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     global $user;
     $user = new phpbb_mock_user();
     $user->lang = new phpbb_mock_lang();
 }
開發者ID:MrAdder,項目名稱:phpbb,代碼行數:7,代碼來源:h_radio_test.php

示例7: setUp

    public function setUp()
    {
        parent::setUp();
        $this->bootstrap();
        self::$cookieJar = new CookieJar();
        self::$client = new Goutte\Client(array(), null, self::$cookieJar);
        // Reset the curl handle because it is 0 at this point and not a valid
        // resource
        self::$client->getClient()->getCurlMulti()->reset(true);
        // Clear the language array so that things
        // that were added in other tests are gone
        $this->lang = array();
        $this->add_lang('common');
        $db = $this->get_db();
        foreach (static::setup_extensions() as $extension) {
            $this->purge_cache();
            $sql = 'SELECT ext_active
				FROM ' . EXT_TABLE . "\n\t\t\t\tWHERE ext_name = '" . $db->sql_escape($extension) . "'";
            $result = $db->sql_query($sql);
            $status = (bool) $db->sql_fetchfield('ext_active');
            $db->sql_freeresult($result);
            if (!$status) {
                $this->install_ext($extension);
            }
        }
    }
開發者ID:Mtechnik,項目名稱:phpbb,代碼行數:26,代碼來源:phpbb_functional_test_case.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->config = new \phpbb\config\config(array());
     $this->db = new \phpbb\db\driver\sqlite();
     $this->db_tools = new \phpbb\db\tools($this->db);
     $this->table_prefix = 'phpbb_';
 }
開發者ID:Voxel37,項目名稱:phpbb,代碼行數:8,代碼來源:schema_generator_test.php

示例9: setUp

 public function setUp()
 {
     global $cache, $user, $phpbb_dispatcher;
     parent::setUp();
     $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
     $config = new \phpbb\config\config(array());
     set_config(null, null, null, $config);
 }
開發者ID:phpbb,項目名稱:phpbb,代碼行數:8,代碼來源:generate_text_for_display_test.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     global $phpbb_root_path, $phpEx;
     include_once $phpbb_root_path . 'includes/functions.' . $phpEx;
     $this->cache = $this->getMockBuilder('\\phpbb\\cache\\service')->disableOriginalConstructor()->getMock();
     $this->version_helper = new \phpbb\version_helper($this->cache, new \phpbb\config\config(array('version' => '3.1.0')), new \phpbb\file_downloader(), new \phpbb\user('\\phpbb\\datetime'));
 }
開發者ID:Voxel37,項目名稱:phpbb,代碼行數:8,代碼來源:version_fetch_test.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     global $phpbb_container;
     $phpbb_container = new phpbb_mock_container_builder();
     $phpbb_container->set('auth.provider_collection', array('auth.provider.acp_board_valid' => new phpbb\auth\provider\acp\board_valid(), 'auth.provider.acp_board_invalid' => new phpbb\auth\provider\acp\board_invalid()));
     $this->acp_board = new acp_board();
 }
開發者ID:ZerGabriel,項目名稱:phpbb,代碼行數:8,代碼來源:select_auth_method_test.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $user = new \phpbb\user('\\phpbb\\datetime');
     $user->add_lang('ucp');
     $request = $this->getMock('\\phpbb\\request\\request');
     $template = $this->getMock('\\phpbb\\template\\template');
     $this->field = new \phpbb\profilefields\type\type_googleplus($request, $template, $user);
 }
開發者ID:Voxel37,項目名稱:phpbb,代碼行數:9,代碼來源:type_googleplus_test.php

示例13: setUp

 public function setUp()
 {
     global $cache, $user, $phpbb_dispatcher;
     parent::setUp();
     $cache = new phpbb_mock_cache();
     $user = new phpbb_mock_user();
     $user->optionset('viewcensors', false);
     $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
 }
開發者ID:Voxel37,項目名稱:phpbb,代碼行數:9,代碼來源:generate_text_for_display_test.php

示例14: setUp

 public function setUp()
 {
     $container = new phpbb_mock_container_builder();
     $container->set('foo', new StdClass());
     $container->set('bar', new StdClass());
     $this->service_collection = new \phpbb\di\service_collection($container);
     $this->service_collection->add('foo');
     $this->service_collection->add('bar');
     parent::setUp();
 }
開發者ID:ZerGabriel,項目名稱:phpbb,代碼行數:10,代碼來源:service_collection_test.php

示例15: setUp

 protected function setUp()
 {
     global $user, $phpbb_dispatcher, $phpbb_container, $phpbb_root_path, $phpbb_path_helper;
     parent::setUp();
     $phpbb_container = new phpbb_mock_container_builder();
     $user = new phpbb_mock_user();
     $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
     $phpbb_path_helper = new \phpbb\path_helper(new \phpbb\symfony_request(new phpbb_mock_request()), new \phpbb\filesystem\filesystem(), $this->getMock('\\phpbb\\request\\request'), $phpbb_root_path, 'php');
     $phpbb_container->set('path_helper', $phpbb_path_helper);
 }
開發者ID:ZerGabriel,項目名稱:phpbb,代碼行數:10,代碼來源:build_url_test.php


注:本文中的phpbb_test_case::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。