Пример #1
0
 /**
  * Test for Check HTTP
  *
  * @group medium
  *
  * @return void
  */
 public function testCheckHTTP()
 {
     if (!function_exists('curl_init')) {
         $this->markTestSkipped('Missing curl extension!');
     }
     $this->assertTrue($this->object->checkHTTP("http://www.phpmyadmin.net/test/data"));
     $this->assertContains("TEST DATA", $this->object->checkHTTP("http://www.phpmyadmin.net/test/data", true));
     $this->assertFalse($this->object->checkHTTP("http://www.phpmyadmin.net/test/nothing"));
 }
Пример #2
0
 /**
  * Test for Check HTTP
  *
  * @group medium
  *
  * @return void
  */
 public function testCheckHTTP()
 {
     if (!function_exists('curl_init')) {
         $this->markTestSkipped('Missing curl extension!');
     }
     $this->assertTrue($this->object->checkHTTP("https://www.phpmyadmin.net/test/data"));
     $this->assertContains("TEST DATA", $this->object->checkHTTP("https://www.phpmyadmin.net/test/data", true));
     $this->assertFalse($this->object->checkHTTP("https://www.phpmyadmin.net/test/nothing"));
     // Use rate limit API as it's not subject to rate limiting
     $this->assertContains('"resources"', $this->object->checkHTTP("https://api.github.com/rate_limit", true));
 }
Пример #3
0
echo '  <ul>';
// Displays language selection combo
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
    echo '<li id="li_select_lang" class="no_bullets">';
    include_once 'libraries/display_select_lang.lib.php';
    echo PMA\libraries\Util::getImage('s_lang.png'), " ", PMA_getLanguageSelectorHtml();
    echo '</li>';
}
// ThemeManager if available
if ($GLOBALS['cfg']['ThemeManager']) {
    echo '<li id="li_select_theme" class="no_bullets">';
    echo PMA\libraries\Util::getImage('s_theme.png'), " ", $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
    echo '</li>';
}
echo '<li id="li_select_fontsize">';
echo PMA\libraries\Config::getFontsizeForm();
echo '</li>';
echo '</ul>';
// User preferences
if ($server > 0) {
    echo '<ul>';
    PMA_printListItem(PMA\libraries\Util::getImage('b_tblops.png') . "&nbsp;" . __('More settings'), 'li_user_preferences', 'prefs_manage.php' . $common_url_query, null, null, null, "no_bullets");
    echo '</ul>';
}
echo '</div>';
echo '</div>';
echo '<div id="main_pane_right">';
if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
    echo '<div class="group">';
    echo '<h2>', __('Database server'), '</h2>';
    echo '<ul>', "\n";
define('PMA_MYSQL_STR_VERSION', '5.50.00');
define('PMA_MYSQL_VERSION_COMMENT', 'MySQL Community Server (GPL)');
// Selenium tests setup
$test_defaults = array('TESTSUITE_SERVER' => 'localhost', 'TESTSUITE_USER' => 'root', 'TESTSUITE_PASSWORD' => '', 'TESTSUITE_DATABASE' => 'test', 'TESTSUITE_URL' => 'http://localhost/phpmyadmin/', 'TESTSUITE_SELENIUM_HOST' => '', 'TESTSUITE_SELENIUM_PORT' => '4444', 'TESTSUITE_SELENIUM_BROWSER' => 'firefox', 'TESTSUITE_SELENIUM_COVERAGE' => '', 'TESTSUITE_BROWSERSTACK_USER' => '', 'TESTSUITE_BROWSERSTACK_KEY' => '', 'TESTSUITE_FULL' => '');
foreach ($test_defaults as $varname => $defvalue) {
    $envvar = getenv($varname);
    if ($envvar) {
        $GLOBALS[$varname] = $envvar;
    } else {
        $GLOBALS[$varname] = $defvalue;
    }
}
require_once 'libraries/autoloader.php';
require_once 'libraries/core.lib.php';
$GLOBALS['PMA_String'] = new PMA_String();
$CFG = new PMA\libraries\Config();
// Initialize PMA_VERSION variable
define('PMA_VERSION', $CFG->get('PMA_VERSION'));
unset($CFG);
require_once 'libraries/sql-parser/autoload.php';
// Set proxy information from env, if available
$http_proxy = getenv('http_proxy');
if ($http_proxy && ($url_info = parse_url($http_proxy))) {
    define('PROXY_URL', $url_info['host'] . ':' . $url_info['port']);
    define('PROXY_USER', empty($url_info['user']) ? '' : $url_info['user']);
    define('PROXY_PASS', empty($url_info['pass']) ? '' : $url_info['pass']);
} else {
    define('PROXY_URL', '');
    define('PROXY_USER', '');
    define('PROXY_PASS', '');
}
Пример #5
0
 /**
  * Tests for rewriting URL to SSL variant
  *
  * @param string $original Original URL
  * @param string $expected Expected URL rewritten to SSL
  *
  * @return void
  *
  * @dataProvider sslUris
  */
 public function testSSLUri($original, $expected)
 {
     $this->object->set('PmaAbsoluteUri', $original);
     $this->assertEquals($expected, $this->object->getSSLUri());
 }
Пример #6
0
 /**
  * Test for isGitRevision
  *
  * @return void
  */
 public function testIsGitRevision()
 {
     $this->assertTrue($this->object->isGitRevision());
 }