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); }
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); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); // Set up an intercepting proxy for getimagesize() calls stream_wrapper_unregister('http'); stream_wrapper_register('http', __CLASS__ . '_proxy'); }
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; } }
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); }
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; } }
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; } }