本文整理汇总了PHP中phpbb_test_case::setUpBeforeClass方法的典型用法代码示例。如果您正苦于以下问题:PHP phpbb_test_case::setUpBeforeClass方法的具体用法?PHP phpbb_test_case::setUpBeforeClass怎么用?PHP phpbb_test_case::setUpBeforeClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpbb_test_case
的用法示例。
在下文中一共展示了phpbb_test_case::setUpBeforeClass方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$reflection_class = new ReflectionClass('\\phpbb\\filesystem\\filesystem');
self::$filesystem_own_realpath = $reflection_class->getMethod('phpbb_own_realpath');
self::$filesystem_own_realpath->setAccessible(true);
}
示例2: 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);
}
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
// Set up an intercepting proxy for getimagesize() calls
stream_wrapper_unregister('http');
stream_wrapper_register('http', __CLASS__ . '_proxy');
}
示例4: 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;
}
}
示例5: 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);
}
示例6: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::$config = phpbb_test_case_helpers::get_test_config();
self::$root_url = self::$config['phpbb_functional_url'];
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::$already_installed) {
self::install_board();
self::$already_installed = true;
}
}
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
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::$already_installed) {
self::install_board();
self::$already_installed = true;
}
}