phpbb_functional_test_case::setUp PHP Method

setUp() public method

public 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');
        $this->purge_cache();
        $db = $this->get_db();
        foreach (static::setup_extensions() as $extension) {
            $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);
            }
        }
    }

Usage Example

 public function setUp()
 {
     parent::setUp();
     $this->get_db();
     $this->phpbb_extension_manager = $this->get_extension_manager();
     $this->purge_cache();
 }
All Usage Examples Of phpbb_functional_test_case::setUp