Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2020-01-20 02:22:37 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2020-01-20 02:22:37 +0300
commit63dbcd01d9565679cb3bf20a53e1f6b5f3bb412a (patch)
tree9dd41d9a6495e423335ed831ea94785cb4709ef7 /test/bootstrap-dist.php
parent33477fe024608de2e4b4b3e55e377cf362737746 (diff)
Remove or ignore side effects in PHP files
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test/bootstrap-dist.php')
-rw-r--r--test/bootstrap-dist.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/bootstrap-dist.php b/test/bootstrap-dist.php
index 8d62e6407b..d97add6a77 100644
--- a/test/bootstrap-dist.php
+++ b/test/bootstrap-dist.php
@@ -14,7 +14,9 @@ use PhpMyAdmin\Tests\Stubs\DbiDummy;
use PhpMyAdmin\Theme;
if (! defined('ROOT_PATH')) {
+ // phpcs:disable PSR1.Files.SideEffects
define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
+ // phpcs:enable
}
/**
@@ -36,8 +38,10 @@ set_include_path(
);
// Setting constants for testing
+// phpcs:disable PSR1.Files.SideEffects
define('PHPMYADMIN', 1);
define('TESTSUITE', 1);
+// phpcs:enable
// Selenium tests setup
$test_defaults = [
@@ -73,9 +77,12 @@ Loader::loadFunctions();
$GLOBALS['PMA_Config'] = new Config();
$GLOBALS['PMA_Config']->set('environment', 'development');
$GLOBALS['cfg']['environment'] = 'development';
+
// Initialize PMA_VERSION variable
+// phpcs:disable PSR1.Files.SideEffects
define('PMA_VERSION', $GLOBALS['PMA_Config']->get('PMA_VERSION'));
define('PMA_MAJOR_VERSION', $GLOBALS['PMA_Config']->get('PMA_MAJOR_VERSION'));
+// phpcs:enable
/* Ensure default language is active */
LanguageManager::getInstance()->getLanguage('en')->activate();
@@ -86,13 +93,17 @@ $GLOBALS['dbi'] = DatabaseInterface::load(new DbiDummy());
// Set proxy information from env, if available
$http_proxy = getenv('http_proxy');
if (PHP_SAPI == 'cli' && $http_proxy && ($url_info = parse_url($http_proxy))) {
+ // phpcs:disable PSR1.Files.SideEffects
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']);
+ // phpcs:enable
} else {
+ // phpcs:disable PSR1.Files.SideEffects
define('PROXY_URL', '');
define('PROXY_USER', '');
define('PROXY_PASS', '');
+ // phpcs:enable
}
// Ensure we have session started