• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP phpbb_test_case类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中phpbb_test_case的典型用法代码示例。如果您正苦于以下问题:PHP phpbb_test_case类的具体用法?PHP phpbb_test_case怎么用?PHP phpbb_test_case使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了phpbb_test_case类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     if (version_compare(PHP_VERSION, '5.3.19', '<')) {
         self::markTestSkipped('UI test case requires at least PHP 5.3.19.');
     } else {
         if (!class_exists('\\RemoteWebDriver')) {
             self::markTestSkipped('Could not find RemoteWebDriver class. ' . 'Run "php ../composer.phar install" from the tests folder.');
         }
     }
     self::$config = phpbb_test_case_helpers::get_test_config();
     self::$root_url = self::$config['phpbb_functional_url'];
     // Important: this is used both for installation and by
     // test cases for querying the tables.
     // Therefore table prefix must be set before a board is
     // installed, and also before each test case is run.
     self::$config['table_prefix'] = 'phpbb_';
     if (!isset(self::$config['phpbb_functional_url'])) {
         self::markTestSkipped('phpbb_functional_url was not set in test_config and wasn\'t set as PHPBB_FUNCTIONAL_URL environment variable either.');
     }
     if (!self::$webDriver) {
         try {
             $capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox');
             self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities);
         } catch (WebDriverCurlException $e) {
             self::markTestSkipped('PhantomJS webserver is not running.');
         }
     }
     if (!self::$already_installed) {
         self::install_board();
         self::$already_installed = true;
     }
 }
开发者ID:MrAdder,项目名称:phpbb,代码行数:33,代码来源:phpbb_ui_test_case.php


示例2: 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


示例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: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $reflection_class = new ReflectionClass('\\phpbb\\extension\\base');
     self::$reflection_method_get_migration_file_list = $reflection_class->getMethod('get_migration_file_list');
     self::$reflection_method_get_migration_file_list->setAccessible(true);
 }
开发者ID:Mtechnik,项目名称:phpbb,代码行数:7,代码来源:extension_base_test.php


示例5: 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


示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $reflection = new ReflectionClass('\\phpbb\\language\\language');
     self::$language_reflection_lang = $reflection->getProperty('lang');
     self::$language_reflection_lang->setAccessible(true);
 }
开发者ID:phpbb,项目名称:phpbb,代码行数:7,代码来源:template_test_case.php


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     if (self::$db instanceof \phpbb\db\driver\driver_interface) {
         // Close the database connections again this test
         self::$db->sql_close();
     }
 }
开发者ID:jipsy,项目名称:phpbb,代码行数:8,代码来源:phpbb_ui_test_case.php


示例13: 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


示例14: 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


示例15: 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


示例16: 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


示例17: 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


示例18: setUp

 public function setUp()
 {
     parent::setUp();
     global $auth, $phpbb_dispatcher, $user;
     $auth = $this->getMock('\\phpbb\\auth\\auth');
     $auth->expects($this->any())->method('acl_get')->with($this->stringContains('_'), $this->anything())->will($this->returnValueMap(array(array('u_viewprofile', true))));
     $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
     $user->data['user_id'] = ANONYMOUS;
     $user->lang['GUEST'] = 'Guest';
 }
开发者ID:phpbb,项目名称:phpbb,代码行数:10,代码来源:get_username_string_test.php


示例19: setUp

 public function setUp()
 {
     parent::setUp();
     global $phpbb_root_path, $phpEx;
     $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
     $lang = new \phpbb\language\language($lang_loader);
     $user = new \phpbb\user($lang, '\\phpbb\\datetime');
     $this->user = $user;
     $this->user->data = array('user_lang' => 'en');
     $this->user->add_lang('common');
 }
开发者ID:ZerGabriel,项目名称:phpbb,代码行数:11,代码来源:generate_string_list.php


示例20: setUp

 public function setUp()
 {
     $this->phpbb_root_path = dirname(__FILE__) . '/';
     $this->config_php = new \phpbb\config_php_file($this->phpbb_root_path . 'fixtures/', 'php');
     $this->builder = new phpbb_mock_phpbb_di_container_builder($this->config_php, $this->phpbb_root_path . 'fixtures/', 'php');
     $this->filename = $this->phpbb_root_path . '../tmp/container.php';
     if (is_file($this->filename)) {
         unlink($this->filename);
     }
     parent::setUp();
 }
开发者ID:Voxel37,项目名称:phpbb,代码行数:11,代码来源:create_container_test.php



注:本文中的phpbb_test_case类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP phpgw类代码示例发布时间:2022-05-23
下一篇:
PHP phpbb_database_test_case类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap