Skip to content

Commit

Permalink
Drop test constants PROXY_{URL,USER,PASS} in favor of existing ENV ht…
Browse files Browse the repository at this point in the history
…tp_proxy

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Mar 5, 2021
1 parent b5263d4 commit abdeb98
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
3 changes: 0 additions & 3 deletions test/bootstrap-static.php
Expand Up @@ -34,9 +34,6 @@

// phpcs:disable PSR1.Files.SideEffects
define('PMA_VERSION', $GLOBALS['PMA_Config']->get('PMA_VERSION'));
define('PROXY_URL', '');
define('PROXY_USER', '');
define('PROXY_PASS', '');
define('PMA_PATH_TO_BASEDIR', '');
// phpcs:enable

Expand Down
8 changes: 0 additions & 8 deletions test/classes/AbstractTestCase.php
Expand Up @@ -128,14 +128,6 @@ protected function setProxySettings(): void
$GLOBALS['cfg']['ProxyUser'] = $proxyUser;
$GLOBALS['cfg']['ProxyPass'] = $proxyPass;
}

// phpcs:disable PSR1.Files.SideEffects
if (! defined('PROXY_URL')) {
define('PROXY_URL', $proxyUrl ?? '');
define('PROXY_USER', $proxyUser ?? '');
define('PROXY_PASS', $proxyPass ?? '');
}
// phpcs:enable
}

protected function defineVersionConstants(): void
Expand Down
4 changes: 1 addition & 3 deletions test/classes/VersionInformationTest.php
Expand Up @@ -52,9 +52,7 @@ protected function setUp(): void
*/
public function testGetLatestVersion(): void
{
$GLOBALS['cfg']['ProxyUrl'] = PROXY_URL;
$GLOBALS['cfg']['ProxyUser'] = PROXY_USER;
$GLOBALS['cfg']['ProxyPass'] = PROXY_PASS;
$this->setProxySettings();
$GLOBALS['cfg']['VersionCheck'] = true;
$versionInformation = new VersionInformation();
$version = $versionInformation->getLatestVersion();
Expand Down
3 changes: 0 additions & 3 deletions test/phpstan-constants.php
Expand Up @@ -4,9 +4,6 @@

define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
define('PMA_VERSION', '5.1.0-dev');
define('PROXY_URL', '');
define('PROXY_USER', '');
define('PROXY_PASS', '');
define('PMA_USR_BROWSER_AGENT', 'Other');
define('PMA_USR_BROWSER_VER', 1);
define('PMA_USR_OS', 'os');
Expand Down

0 comments on commit abdeb98

Please sign in to comment.