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


PHP Theme::load方法代码示例

本文整理汇总了PHP中PMA\libraries\Theme::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Theme::load方法的具体用法?PHP Theme::load怎么用?PHP Theme::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA\libraries\Theme的用法示例。


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

示例1: setUp

 /**
  * Prepares environment for the test.
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     $_REQUEST['mr_adduser'] = "mr_adduser";
     //$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']['ShowHint'] = true;
     $GLOBALS['table'] = "table";
     $GLOBALS['url_params'] = array();
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //Mock DBI
     $slave_host = array(array('Server_id' => 'Server_id1', 'Host' => 'Host1'), array('Server_id' => 'Server_id2', 'Host' => 'Host2'));
     $fetchResult = array(array("SHOW SLAVE HOSTS", null, null, null, 0, $slave_host));
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
     $fields_info = array("Host" => array("Field" => "host", "Type" => "char(60)", "Null" => "NO"));
     $dbi->expects($this->any())->method('getColumns')->will($this->returnValue($fields_info));
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:pboutin44,项目名称:maintest,代码行数:37,代码来源:PMA_server_replication_test.php

示例2: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  * @return void
  */
 protected function setUp()
 {
     $this->object = new PMA\libraries\ErrorHandler();
     $GLOBALS['pmaThemeImage'] = 'image';
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
 }
开发者ID:ryanfmurphy,项目名称:phpmyadmin,代码行数:14,代码来源:PMA_ErrorHandler_test.php

示例3: setUp

 /**
  * Prepares environment for the test.
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['server'] = 1;
     $GLOBALS['cfg']['Server']['DisableIS'] = false;
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     $table = $this->getMockBuilder('PMA\\libraries\\Table')->disableOriginalConstructor()->getMock();
     // Expect the table will have 6 rows
     $table->expects($this->any())->method('getRealRowCountTable')->will($this->returnValue(6));
     $table->expects($this->any())->method('countRecords')->will($this->returnValue(6));
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->any())->method('getTable')->will($this->returnValue($table));
     $GLOBALS['dbi'] = $dbi;
     $container = Container::getDefaultContainer();
     $container->set('db', 'db');
     $container->set('table', 'table');
     $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,代码行数:33,代码来源:DatabaseStructureControllerTest.php

示例4: setUp

 /**
  * Prepares environment for the test.
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['server'] = 1;
     $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['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     Util::cacheSet('profiling_supported', true);
     $binary_log_file_names = array();
     $binary_log_file_names[] = array("Log_name" => "index1", "File_size" => 100);
     $binary_log_file_names[] = array("Log_name" => "index2", "File_size" => 200);
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->once())->method('fetchResult')->will($this->returnValue($binary_log_file_names));
     $container = Container::getDefaultContainer();
     $container->set('dbi', $dbi);
 }
开发者ID:pboutin44,项目名称:maintest,代码行数:35,代码来源:ServerBinlogControllerTest.php

示例5: setUp

 /**
  * prepares environment for tests
  *
  * @return void
  */
 public function setUp()
 {
     $GLOBALS['PMA_Types'] = new TypesMySQL();
     $GLOBALS['cfg']['Server']['user'] = 'pma_user';
     $GLOBALS['cfg']['Server']['DisableIS'] = true;
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['cfg']['ServerDefault'] = "PMA_server";
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['pmaThemeImage'] = 'image';
     $GLOBALS['cfg']['CharEditing'] = '';
     $GLOBALS['cfg']['LimitChars'] = 50;
     $GLOBALS['db'] = 'PMA_db';
     $GLOBALS['table'] = 'PMA_table';
     //$_SESSION
     $GLOBALS['server'] = 1;
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     $_SESSION['relation'][1] = array('PMA_VERSION' => PMA_VERSION, 'centralcolumnswork' => true, 'relwork' => 1, 'db' => 'phpmyadmin', 'relation' => 'relation', 'central_columns' => 'pma_central_columns');
     // mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
     // set some common expectations
     $dbi->expects($this->any())->method('selectDb')->will($this->returnValue(true));
     $dbi->expects($this->any())->method('getColumns')->will($this->returnValue(array("id" => array("Type" => "integer", "Null" => "NO"), "col1" => array("Type" => 'varchar(100)', "Null" => "YES"), "col2" => array("Type" => 'DATETIME', "Null" => "NO"))));
     $dbi->expects($this->any())->method('getColumnNames')->will($this->returnValue(array("id", "col1", "col2")));
     $dbi->expects($this->any())->method('tryQuery')->will($this->returnValue(true));
     $dbi->expects($this->any())->method('getTables')->will($this->returnValue(array("PMA_table", "PMA_table1", "PMA_table2")));
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:33,代码来源:PMA_central_columns_test.php

示例6: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  * @return void
  */
 protected function setUp()
 {
     $GLOBALS['plugin_param'] = "csv";
     $this->object = new ImportCsv();
     //setting
     $GLOBALS['finished'] = false;
     $GLOBALS['read_limit'] = 100000000;
     $GLOBALS['offset'] = 0;
     $GLOBALS['cfg']['Server']['DisableIS'] = false;
     $GLOBALS['cfg']['ServerDefault'] = 0;
     $GLOBALS['cfg']['AllowUserDropDatabase'] = false;
     $GLOBALS['cfg']['ShowHint'] = true;
     $GLOBALS['import_file'] = 'test/test_data/db_test.csv';
     $GLOBALS['import_text'] = 'ImportCsv_Test';
     $GLOBALS['compression'] = 'none';
     $GLOBALS['read_multiply'] = 10;
     $GLOBALS['import_type'] = 'Xml';
     $GLOBALS['pmaThemeImage'] = 'image';
     $GLOBALS['import_handle'] = @fopen($GLOBALS['import_file'], 'r');
     //separator for csv
     $GLOBALS['csv_terminated'] = "\r";
     $GLOBALS['csv_enclosed'] = '"';
     $GLOBALS['csv_escaped'] = '"';
     $GLOBALS['csv_new_line'] = 'auto';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:38,代码来源:ImportCsvTest.php

示例7: 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

示例8: 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'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     $_SESSION['relation'][$GLOBALS['server']] = "";
     $pmaconfig = $this->getMockBuilder('PMA\\libraries\\Config')->disableOriginalConstructor()->getMock();
     $pmaconfig->expects($this->any())->method('getUserValue')->will($this->returnValue('user value for test'));
     $GLOBALS['PMA_Config'] = $pmaconfig;
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:37,代码来源:PMA_display_export_test.php

示例9: setUp

 /**
  * prepares environment for tests
  *
  * @return void
  */
 public function setUp()
 {
     $GLOBALS['cfg']['LimitChars'] = 50;
     $GLOBALS['PMA_Types'] = new TypesMySQL();
     $GLOBALS['cfg']['ServerDefault'] = "PMA_server";
     $GLOBALS['pmaThemeImage'] = 'image';
     $GLOBALS['cfg']['ShowHint'] = true;
     $GLOBALS['cfg']['CharEditing'] = '';
     $GLOBALS['cfg']['ActionLinksMode'] = 'icons';
     $GLOBALS['db'] = 'PMA_db';
     $GLOBALS['table'] = 'PMA_table';
     $GLOBALS['server'] = 1;
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
     // set expectations
     $dbi->expects($this->any())->method('selectDb')->will($this->returnValue(true));
     $dbi->expects($this->any())->method('getColumns')->will($this->returnValue(array("id" => array("Type" => "integer"), "col1" => array("Type" => 'varchar(100)'), "col2" => array("Type" => 'DATETIME'))));
     $dbi->expects($this->any())->method('getColumnNames')->will($this->returnValue(array("id", "col1", "col2")));
     $map = array(array('PMA_db', 'PMA_table1', null, array()), array('PMA_db', 'PMA_table', null, array(array('Key_name' => 'PRIMARY', 'Column_name' => 'id'))), array('PMA_db', 'PMA_table2', null, array(array('Key_name' => 'PRIMARY', 'Column_name' => 'id'), array('Key_name' => 'PRIMARY', 'Column_name' => 'col1'))));
     $dbi->expects($this->any())->method('getTableIndexes')->will($this->returnValueMap($map));
     $dbi->expects($this->any())->method('tryQuery')->will($this->returnValue(true));
     $dbi->expects($this->any())->method('fetchResult')->will($this->returnValue(array(0)));
 }
开发者ID:pboutin44,项目名称:maintest,代码行数:32,代码来源:PMA_normalization_test.php

示例10: setup

 /**
  * Setup for test cases
  *
  * @return void
  */
 public function setup()
 {
     $GLOBALS['server'] = 1;
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $GLOBALS['pmaThemeImage'] = 'theme/';
     $GLOBALS['PMA_PHP_SELF'] = 'index.php';
     $GLOBALS['cfg']['ServerDefault'] = 1;
     $GLOBALS['text_dir'] = 'ltr';
     $GLOBALS['db'] = 'db';
     $GLOBALS['table'] = 'table';
     $GLOBALS['PMA_Types'] = new TypesMySQL();
     $GLOBALS['cfg']['LimitChars'] = 50;
     $GLOBALS['cfg']['LongtextDoubleTextarea'] = false;
     $GLOBALS['cfg']['ShowFieldTypesInDataEditView'] = true;
     $GLOBALS['cfg']['ShowFunctionFields'] = true;
     $GLOBALS['cfg']['ProtectBinary'] = 'blob';
     $GLOBALS['cfg']['MaxSizeForInputField'] = 10;
     $GLOBALS['cfg']['MinSizeForInputField'] = 2;
     $GLOBALS['cfg']['TextareaRows'] = 5;
     $GLOBALS['cfg']['TextareaCols'] = 4;
     $GLOBALS['cfg']['CharTextareaRows'] = 5;
     $GLOBALS['cfg']['CharTextareaCols'] = 6;
     $GLOBALS['cfg']['AllowThirdPartyFraming'] = false;
     $GLOBALS['cfg']['SendErrorReports'] = 'ask';
     $GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
     $GLOBALS['cfg']['ShowDatabasesNavigationAsTree'] = true;
     $GLOBALS['cfg']['DefaultTabTable'] = 'browse';
     $GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = 'structure';
     $GLOBALS['cfg']['NavigationTreeDefaultTabTable2'] = '';
     $GLOBALS['cfg']['Confirm'] = true;
     $GLOBALS['cfg']['LoginCookieValidity'] = 1440;
     $GLOBALS['PMA_Config'] = new PMA\libraries\Config();
 }
开发者ID:RimeOfficial,项目名称:phpMyAdmin,代码行数:38,代码来源:PMA_insert_edit_test.php

示例11: 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

示例12: 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']['Server']['DisableIS'] = false;
     $GLOBALS['server'] = 0;
     $GLOBALS['cfg']['ActionLinksMode'] = "both";
     $GLOBALS['pmaThemeImage'] = 'image';
     //_SESSION
     $_SESSION['relation'][$GLOBALS['server']] = array('PMA_VERSION' => PMA_VERSION, 'table_coords' => "table_name", 'displaywork' => 'displaywork', 'db' => "information_schema", 'table_info' => 'table_info', 'relwork' => 'relwork', 'commwork' => 'commwork', 'pdfwork' => 'pdfwork', 'column_info' => 'column_info', 'relation' => 'relation');
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->any())->method('query')->will($this->returnValue(true));
     $GLOBALS['dbi'] = $dbi;
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:30,代码来源:PMA_mult_submits_test.php

示例13: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  * @return void
  */
 protected function setUp()
 {
     $this->object = new PMA\libraries\Error('2', 'Compile Error', 'error.txt', 15);
     $GLOBALS['pmaThemeImage'] = 'image';
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:14,代码来源:ErrorTest.php

示例14: 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'] = 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;
 }
开发者ID:netroby,项目名称:phpmyadmin,代码行数:37,代码来源:PMA_server_variables_test.php

示例15: setUp

 /**
  * Prepares environment for the test.
  *
  * @return void
  */
 public function setUp()
 {
     //$_REQUEST
     $_REQUEST['log'] = "index1";
     $_REQUEST['pos'] = 3;
     //$GLOBALS
     $GLOBALS['cfg']['MaxRows'] = 10;
     $GLOBALS['server'] = 1;
     $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']['Server']['DisableIS'] = false;
     $GLOBALS['table'] = "table";
     $GLOBALS['pmaThemeImage'] = 'image';
     //$_SESSION
     $_SESSION['PMA_Theme'] = Theme::load('./themes/pmahomme');
     $_SESSION['PMA_Theme'] = new Theme();
     $table = $this->getMockBuilder('PMA\\libraries\\Table')->disableOriginalConstructor()->getMock();
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->any())->method('getTable')->will($this->returnValue($table));
     $GLOBALS['dbi'] = $dbi;
     $container = Container::getDefaultContainer();
     $container->set('db', 'db');
     $container->set('table', 'table');
     $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:netroby,项目名称:phpmyadmin,代码行数:38,代码来源:TableStructureControllerTest.php


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