require_once './libraries/display_select_lang.lib.php'; require_once './libraries/config/FormDisplay.class.php'; require_once './libraries/config/ServerConfigChecks.class.php'; require_once './setup/lib/index.lib.php'; // prepare unfiltered language list $all_languages = PMA_langList(); uasort($all_languages, 'PMA_languageCmp'); $cf = $GLOBALS['ConfigFile']; $separator = PMA_URL_getArgSeparator('html'); // message handling PMA_messagesBegin(); // // Check phpMyAdmin version // if (isset($_GET['version_check'])) { PMA_versionCheck(); } // // Perform various security, compatibility and consistency checks // $configChecker = new ServerConfigChecks($GLOBALS['ConfigFile']); $configChecker->performConfigChecks(); // // Check whether we can read/write configuration // $config_readable = false; $config_writable = false; $config_exists = false; PMA_checkConfigRw($config_readable, $config_writable, $config_exists); if (!$config_writable || !$config_readable) { PMA_messagesSet('error', 'config_rw', __('Cannot load or save configuration'), PMA_sanitize(__('Please create web server writable folder [em]config[/em] in ' . 'phpMyAdmin top level directory as described in ' . '[doc@setup_script]documentation[/doc]. Otherwise you will be ' . 'only able to download or display it.')));
/** * Test for PMA_versionCheck * * @return void * * @group medium */ public function testPMAVersionCheckCase3() { $pmaconfig = $this->getMockBuilder('PMA_Config')->disableOriginalConstructor()->getMock(); $pmaconfig->expects($this->once())->method('get')->with('PMA_VERSION')->will($this->returnValue('100.0.0-dev2')); $GLOBALS['PMA_Config'] = $pmaconfig; PMA_versionCheck(); $this->assertArrayHasKey('notice', $_SESSION['messages']); $var = array_values($_SESSION['messages']['notice']); $notice = array_shift($var); $this->assertEquals(1, $notice['fresh']); $this->assertEquals(1, $notice['active']); $this->assertEquals('Version check', $notice['title']); $this->assertContains("No newer stable version is available", $notice['message']); }