phpbb_functional_test_case::setUpBeforeClass PHP Method

setUpBeforeClass() public static method

public static 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;
        }
    }

Usage Example

示例#1
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     self::$helper = new phpbb_test_case_helpers(self);
     self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/../extension/ext/', self::$fixtures);
 }