当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_getenv函数代码示例

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


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

示例1: setup

 /**
  * Configures global environment.
  *
  * @return void
  */
 function setup()
 {
     if (!defined('PMA_IS_WINDOWS')) {
         define('PMA_IS_WINDOWS', false);
     }
     $GLOBALS['cfg']['Server']['DisableIS'] = false;
     $GLOBALS['server'] = 0;
     $GLOBALS['cfg']['ServerDefault'] = 1;
     $GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
     $GLOBALS['cfg']['TableNavigationLinksMode'] = 'both';
     $_SESSION['PMA_Theme'] = new PMA_Theme();
     $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
     $GLOBALS['pmaThemeImage'] = 'theme/';
     $GLOBALS['cfg']['DefaultTabServer'] = 'main.php';
     $GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
     $GLOBALS['cfg']['DefaultTabTable'] = 'sql.php';
     $GLOBALS['cfg']['OBGzip'] = false;
     $GLOBALS['cfg']['NaturalOrder'] = true;
     $GLOBALS['cfg']['TabsMode'] = 'both';
     $GLOBALS['cfg']['DBG']['sql'] = false;
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['server'] = 'server';
     $GLOBALS['db'] = 'pma_test';
     $GLOBALS['table'] = 'table1';
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:30,代码来源:PMA_Menu_test.php

示例2: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['cfg']['ServerDefault'] = "server";
     $GLOBALS['cfg']['RememberSorting'] = true;
     $GLOBALS['cfg']['SQP'] = array();
     $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
     $GLOBALS['cfg']['ShowSQL'] = true;
     $GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
     $GLOBALS['cfg']['LimitChars'] = 100;
     $GLOBALS['cfg']['DBG']['sql'] = false;
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['server_master_status'] = false;
     $GLOBALS['server_slave_status'] = false;
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new PMA_Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     //this data is needed when PMA_ServerStatusData constructs
     $server_status = array("Aborted_clients" => "0", "Aborted_connects" => "0", "Com_delete_multi" => "0", "Com_create_function" => "0", "Com_empty_query" => "0");
     $server_variables = array("auto_increment_increment" => "1", "auto_increment_offset" => "1", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
     $fetchResult = array(array("SHOW GLOBAL STATUS", 0, 1, null, 0, $server_status), array("SHOW GLOBAL VARIABLES", 0, 1, null, 0, $server_variables));
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $GLOBALS['dbi'] = $dbi;
     $this->ServerStatusData = new PMA_ServerStatusData();
     $upTime = "10h";
     $this->ServerStatusData->status['Uptime'] = $upTime;
     $this->ServerStatusData->used_queries = array("Com_change_db" => "15", "Com_select" => "12", "Com_set_option" => "54", "Com_show_databases" => "16", "Com_show_status" => "14", "Com_show_tables" => "13");
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:39,代码来源:PMA_server_status_queries_test.php

示例3: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['server'] = 1;
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     //this data is needed when ServerStatusData constructs
     $server_session_variable = array("auto_increment_increment" => "1", "auto_increment_offset" => "13", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
     $server_global_variables = array("auto_increment_increment" => "0", "auto_increment_offset" => "12");
     $fetchResult = array(array("SHOW SESSION VARIABLES;", 0, 1, null, 0, $server_session_variable), array("SHOW GLOBAL VARIABLES;", 0, 1, null, 0, $server_global_variables));
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $GLOBALS['dbi'] = $dbi;
     $container = Container::getDefaultContainer();
     $container->set('dbi', $GLOBALS['dbi']);
     $this->_response = new \PMA\Test\Stubs\Response();
     $container->set('PMA\\libraries\\Response', $this->_response);
     $container->alias('response', 'PMA\\libraries\\Response');
 }
开发者ID:akandshuvo,项目名称:phpmyadmin,代码行数:32,代码来源:ServerVariablesControllerTest.php

示例4: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['cfg']['ServerDefault'] = "server";
     $GLOBALS['cfg']['RememberSorting'] = true;
     $GLOBALS['cfg']['SQP'] = array();
     $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
     $GLOBALS['cfg']['ShowSQL'] = true;
     $GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
     $GLOBALS['cfg']['LimitChars'] = 100;
     $GLOBALS['cfg']['DBG']['sql'] = false;
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new PMA_Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     //this data is needed when PMA_ServerStatusData constructs
     $server_session_variable = array("auto_increment_increment" => "1", "auto_increment_offset" => "13", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
     $server_global_variables = array("auto_increment_increment" => "0", "auto_increment_offset" => "12");
     $fetchResult = array(array("SHOW SESSION VARIABLES;", 0, 1, null, 0, $server_session_variable), array("SHOW GLOBAL VARIABLES;", 0, 1, null, 0, $server_global_variables));
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:37,代码来源:PMA_server_variables_test.php

示例5: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['cfg']['ExecTimeLimit'] = 300;
     $GLOBALS['cfg']['ServerDefault'] = "PMA_server";
     $GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
     $GLOBALS['cfg']['LimitChars'] = 100;
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['cfg']['Server']['user'] = "pma_user";
     $GLOBALS['cfg']['ShowHint'] = true;
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['cfg']['ZipDump'] = true;
     $GLOBALS['cfg']['GZipDump'] = false;
     $GLOBALS['cfg']['BZipDump'] = false;
     $GLOBALS['cfg']['Export']['asfile'] = true;
     $GLOBALS['cfg']['Export']['file_template_server'] = "file_template_server";
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['PMA_recoding_engine'] = "InnerDB";
     $GLOBALS['server'] = 0;
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     $GLOBALS['db'] = "PMA";
     //$_SESSION
     $_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new PMA_Theme();
     $_SESSION['relation'][$GLOBALS['server']] = "";
     $pmaconfig = $this->getMockBuilder('PMA_Config')->disableOriginalConstructor()->getMock();
     $pmaconfig->expects($this->any())->method('getUserValue')->will($this->returnValue('user value for test'));
     $GLOBALS['PMA_Config'] = $pmaconfig;
 }
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:37,代码来源:PMA_display_export_test.php

示例6: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['cfg']['ShowHint'] = true;
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['replication_info']['master']['status'] = true;
     $GLOBALS['replication_info']['slave']['status'] = false;
     $GLOBALS['replication_types'] = array();
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     //this data is needed when ServerStatusData constructs
     $server_status = array("Aborted_clients" => "0", "Aborted_connects" => "0", "Com_delete_multi" => "0", "Com_create_function" => "0", "Com_empty_query" => "0", "Com_execute_sql" => 2, "Com_stmt_execute" => 2);
     $server_variables = array("auto_increment_increment" => "1", "auto_increment_offset" => "1", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
     $fetchResult = array(array("SHOW GLOBAL STATUS", 0, 1, null, 0, $server_status), array("SHOW GLOBAL VARIABLES", 0, 1, null, 0, $server_variables), array("SELECT concat('Com_', variable_name), variable_value " . "FROM data_dictionary.GLOBAL_STATEMENTS", 0, 1, null, 0, $server_status));
     $dbi->expects($this->at(0))->method('tryQuery')->with('SHOW GLOBAL STATUS')->will($this->returnValue(true));
     $dbi->expects($this->at(1))->method('fetchRow')->will($this->returnValue(array("Aborted_clients", "0")));
     $dbi->expects($this->at(2))->method('fetchRow')->will($this->returnValue(array("Aborted_connects", "0")));
     $dbi->expects($this->at(3))->method('fetchRow')->will($this->returnValue(array("Com_delete_multi", "0")));
     $dbi->expects($this->at(4))->method('fetchRow')->will($this->returnValue(array("Com_create_function", "0")));
     $dbi->expects($this->at(5))->method('fetchRow')->will($this->returnValue(array("Com_empty_query", "0")));
     $dbi->expects($this->at(6))->method('fetchRow')->will($this->returnValue(false));
     $dbi->expects($this->at(7))->method('freeResult');
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $GLOBALS['dbi'] = $dbi;
     $this->ServerStatusData = new ServerStatusData();
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:37,代码来源:PMA_server_status_test.php

示例7: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['cfg']['ServerDefault'] = "server";
     $GLOBALS['cfg']['RememberSorting'] = true;
     $GLOBALS['cfg']['SQP'] = array();
     $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
     $GLOBALS['cfg']['ShowSQL'] = true;
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['cfg']['ShowHint'] = true;
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['replication_info']['master']['status'] = false;
     $GLOBALS['replication_info']['slave']['status'] = false;
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     //this data is needed when ServerStatusData constructs
     $server_status = array("Aborted_clients" => "0", "Aborted_connects" => "0", "Com_delete_multi" => "0", "Com_create_function" => "0", "Com_empty_query" => "0");
     $server_variables = array("auto_increment_increment" => "1", "auto_increment_offset" => "1", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
     $fetchResult = array(array("SHOW GLOBAL STATUS", 0, 1, null, 0, $server_status), array("SHOW GLOBAL VARIABLES", 0, 1, null, 0, $server_variables), array("SELECT concat('Com_', variable_name), variable_value " . "FROM data_dictionary.GLOBAL_STATEMENTS", 0, 1, null, 0, $server_status));
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $GLOBALS['dbi'] = $dbi;
     $this->ServerStatusData = new ServerStatusData();
 }
开发者ID:pboutin44,项目名称:maintest,代码行数:37,代码来源:PMA_server_status_monitor_test.php

示例8: setUp

 /**
  * Prepares environment for the test.
  *
  * @return void
  */
 public function setUp()
 {
     //Constants
     if (!defined("PMA_USR_BROWSER_AGENT")) {
         define("PMA_USR_BROWSER_AGENT", "other");
     }
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['cfg']['SendErrorReports'] = "never";
     $GLOBALS['cfg']['ServerDefault'] = "server";
     $GLOBALS['cfg']['RememberSorting'] = true;
     $GLOBALS['cfg']['SQP'] = array();
     $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
     $GLOBALS['cfg']['ShowSQL'] = true;
     $GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
     $GLOBALS['cfg']['LimitChars'] = 100;
     $GLOBALS['cfg']['AllowThirdPartyFraming'] = false;
     $GLOBALS['cfg']['Server']['pmadb'] = 'pmadb';
     $GLOBALS['cfg']['Server']['usergroups'] = 'usergroups';
     $GLOBALS['cfg']['Server']['users'] = 'users';
     $GLOBALS['cfg']['ActionLinksMode'] = "both";
     $GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
     $GLOBALS['cfg']['QueryWindowHeight'] = 100;
     $GLOBALS['cfg']['QueryWindowWidth'] = 100;
     $GLOBALS['cfg']['PmaAbsoluteUri'] = "PmaAbsoluteUri";
     $GLOBALS['cfg']['DefaultTabTable'] = "db_structure.php";
     $GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = "db_structure.php";
     $GLOBALS['cfg']['Confirm'] = "Confirm";
     $GLOBALS['cfg']['ShowHint'] = true;
     $GLOBALS['cfgRelation'] = array();
     $GLOBALS['cfgRelation']['menuswork'] = false;
     $GLOBALS['table'] = "table";
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['pmaThemeImage'] = 'image';
     $GLOBALS['server'] = 1;
     $GLOBALS['hostname'] = "hostname";
     $GLOBALS['username'] = "username";
     $GLOBALS['collation_connection'] = "collation_connection";
     $GLOBALS['text_dir'] = "text_dir";
     //$_POST
     $_POST['pred_password'] = 'none';
     //$_SESSION
     $_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new PMA_Theme();
     $pmaconfig = $this->getMockBuilder('PMA_Config')->disableOriginalConstructor()->getMock();
     $GLOBALS['PMA_Config'] = $pmaconfig;
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValue(array('grant user1 select', 'grant user2 delete')));
     $fetchSingleRow = array('password' => 'pma_password', 'Table_priv' => 'pri1, pri2', 'Type' => 'Type');
     $dbi->expects($this->any())->method('fetchSingleRow')->will($this->returnValue($fetchSingleRow));
     $fetchValue = array('key1' => 'value1');
     $dbi->expects($this->any())->method('fetchValue')->will($this->returnValue($fetchValue));
     $dbi->expects($this->any())->method('tryQuery')->will($this->returnValue(true));
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:64,代码来源:PMA_server_privileges_test.php

示例9: testCheckParameter

 /**
  * Test for checkParameters
  *
  * @return void
  */
 function testCheckParameter()
 {
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
     $GLOBALS['db'] = "dbDatabase";
     $GLOBALS['table'] = "tblTable";
     $GLOBALS['field'] = "test_field";
     $GLOBALS['sql_query'] = "SELECT * FROM tblTable;";
     $this->expectOutputString("");
     PMA\libraries\Util::checkParameters(array('db', 'table', 'field', 'sql_query'));
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:16,代码来源:PMA_checkParameters_test.php

示例10: PMA_langCheck

/**
 * trys to find the language to use
 *
 * @uses    $GLOBALS['cfg']['lang']
 * @uses    $GLOBALS['cfg']['DefaultLang']
 * @uses    $GLOBALS['lang_failed_cfg']
 * @uses    $GLOBALS['lang_failed_cookie']
 * @uses    $GLOBALS['lang_failed_request']
 * @uses    $_REQUEST['lang']
 * @uses    $_COOKIE['pma_lang']
 * @uses    $_SERVER['HTTP_ACCEPT_LANGUAGE']
 * @uses    $_SERVER['HTTP_USER_AGENT']
 * @uses    PMA_langSet()
 * @uses    PMA_langDetect()
 * @uses    explode()
 * @return  bool    success if valid lang is found, otherwise false
 */
function PMA_langCheck()
{
    // check forced language
    if (!empty($GLOBALS['cfg']['Lang'])) {
        if (PMA_langSet($GLOBALS['cfg']['Lang'])) {
            return true;
        } else {
            $GLOBALS['lang_failed_cfg'] = $GLOBALS['cfg']['Lang'];
        }
    }
    // Don't use REQUEST in following code as it might be confused by cookies with same name
    // check user requested language (POST)
    if (!empty($_POST['lang'])) {
        if (PMA_langSet($_POST['lang'])) {
            return true;
        } else {
            $GLOBALS['lang_failed_request'] = $_POST['lang'];
        }
    }
    // check user requested language (GET)
    if (!empty($_GET['lang'])) {
        if (PMA_langSet($_GET['lang'])) {
            return true;
        } else {
            $GLOBALS['lang_failed_request'] = $_GET['lang'];
        }
    }
    // check previous set language
    if (!empty($_COOKIE['pma_lang'])) {
        if (PMA_langSet($_COOKIE['pma_lang'])) {
            return true;
        } else {
            $GLOBALS['lang_failed_cookie'] = $_COOKIE['pma_lang'];
        }
    }
    // try to findout user's language by checking its HTTP_ACCEPT_LANGUAGE variable
    if (PMA_getenv('HTTP_ACCEPT_LANGUAGE')) {
        foreach (explode(',', PMA_getenv('HTTP_ACCEPT_LANGUAGE')) as $lang) {
            if (PMA_langDetect($lang, 1)) {
                return true;
            }
        }
    }
    // try to findout user's language by checking its HTTP_USER_AGENT variable
    if (PMA_langDetect(PMA_getenv('HTTP_USER_AGENT'), 2)) {
        return true;
    }
    // Didn't catch any valid lang : we use the default settings
    if (PMA_langSet($GLOBALS['cfg']['DefaultLang'])) {
        return true;
    }
    return false;
}
开发者ID:robmat,项目名称:samplebator,代码行数:70,代码来源:select_lang.lib.php

示例11: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['replication_info']['master']['status'] = true;
     $GLOBALS['replication_info']['slave']['status'] = false;
     $GLOBALS['replication_types'] = array();
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:18,代码来源:PMA_server_status_processes_test.php

示例12: setup

 /**
  * Configures global environment.
  *
  * @return void
  */
 function setup()
 {
     if (!defined('PMA_IS_WINDOWS')) {
         define('PMA_IS_WINDOWS', false);
     }
     $GLOBALS['cfg']['Server']['DisableIS'] = false;
     $GLOBALS['server'] = 0;
     $GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
     $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['server'] = 'server';
     $GLOBALS['db'] = 'pma_test';
     $GLOBALS['table'] = 'table1';
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:19,代码来源:MenuTest.php

示例13: setUp

 /**
  * Test for setUp
  *
  * @return void
  */
 public function setUp()
 {
     $GLOBALS['cfg']['Server']['host'] = "localhost";
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['server_master_status'] = true;
     $GLOBALS['server_slave_status'] = false;
     $GLOBALS['replication_types'] = array();
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new PMA_Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:20,代码来源:PMA_server_status_processes_test.php

示例14: setup

 /**
  * Configures global environment.
  *
  * @return void
  */
 function setup()
 {
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['cfg']['Server']['host'] = "::1";
     $GLOBALS['replication_info']['master']['status'] = true;
     $GLOBALS['replication_info']['slave']['status'] = true;
     $GLOBALS['replication_types'] = array();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     //this data is needed when ServerStatusData constructs
     $server_status = array("Aborted_clients" => "0", "Aborted_connects" => "0", "Com_delete_multi" => "0", "Com_create_function" => "0", "Com_empty_query" => 3, "Key_blocks_used" => 2, "Key_writes" => true, "Key_reads" => true, "Key_write_requests" => 5, "Key_read_requests" => 1, "Threads_created" => true, "Connections" => 2);
     $server_variables = array("auto_increment_increment" => "1", "auto_increment_offset" => "1", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF", "key_buffer_size" => 10);
     $fetchResult = array(array("SHOW GLOBAL STATUS", 0, 1, null, 0, $server_status), array("SHOW GLOBAL VARIABLES", 0, 1, null, 0, $server_variables), array("SELECT concat('Com_', variable_name), variable_value " . "FROM data_dictionary.GLOBAL_STATEMENTS", 0, 1, null, 0, $server_status));
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $GLOBALS['dbi'] = $dbi;
     $this->object = new ServerStatusData();
 }
开发者ID:akandshuvo,项目名称:phpmyadmin,代码行数:22,代码来源:ServerStatusDataTest.php

示例15: setup

 /**
  * Configures global environment.
  *
  * @return void
  */
 function setup()
 {
     if (!defined('PMA_IS_WINDOWS')) {
         define('PMA_IS_WINDOWS', false);
     }
     $GLOBALS['server'] = 0;
     $GLOBALS['message'] = 'phpmyadminmessage';
     $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
     $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
     $GLOBALS['server'] = 'server';
     $GLOBALS['db'] = 'pma_test';
     $GLOBALS['table'] = 'table1';
     $GLOBALS['PMA_Config'] = new PMA\libraries\Config();
     $GLOBALS['PMA_Config']->enableBc();
     $GLOBALS['cfg']['Server']['DisableIS'] = false;
     $GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
     $GLOBALS['cfg']['Server']['pmadb'] = '';
     $GLOBALS['cfg']['Server']['user'] = '';
 }
开发者ID:nijel,项目名称:phpmyadmin,代码行数:24,代码来源:HeaderTest.php


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