Skip to content

Commit

Permalink
Use parent::setGlobalConfig();
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed May 21, 2020
1 parent a6c4696 commit 0964470
Show file tree
Hide file tree
Showing 44 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion test/classes/AdvisorTest.php
Expand Up @@ -22,7 +22,7 @@ class AdvisorTest extends PmaTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['server'] = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion test/classes/CentralColumnsTest.php
Expand Up @@ -95,7 +95,7 @@ class CentralColumnsTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['cfg']['Server']['user'] = 'pma_user';
$GLOBALS['cfg']['Server']['DisableIS'] = true;
$GLOBALS['cfg']['MaxRows'] = 10;
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Config/DescriptionTest.php
Expand Up @@ -22,7 +22,7 @@ class DescriptionTest extends PmaTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Config/FormDisplayTest.php
Expand Up @@ -34,7 +34,7 @@ protected function setUp(): void
parent::setTheme();
parent::loadDefaultConfig();
$GLOBALS['pmaThemePath'] = $GLOBALS['PMA_Theme']->getPath();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['server'] = 0;
$this->object = new FormDisplay(new ConfigFile());
Form::resetGroupCounter();
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Config/FormTest.php
Expand Up @@ -32,7 +32,7 @@ protected function setUp(): void
parent::setTheme();
parent::loadDefaultConfig();
$GLOBALS['pmaThemePath'] = $GLOBALS['PMA_Theme']->getPath();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['server'] = 0;
$this->object = new Form(
'pma_form_name',
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Config/Forms/FormListTest.php
Expand Up @@ -19,7 +19,7 @@ protected function setUp(): void
{
parent::setUp();
parent::loadDefaultConfig();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['server'] = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion test/classes/Config/PageSettingsTest.php
Expand Up @@ -22,7 +22,7 @@ protected function setUp(): void
{
parent::setUp();
parent::setLanguage();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['server'] = 1;
$GLOBALS['db'] = 'db';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Config/ServerConfigChecksTest.php
Expand Up @@ -28,7 +28,7 @@ class ServerConfigChecksTest extends PmaTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['cfg']['AvailableCharsets'] = [];
$GLOBALS['cfg']['ServerDefault'] = 0;
$GLOBALS['server'] = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Controllers/Server/BinlogControllerTest.php
Expand Up @@ -27,7 +27,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['cfg']['MaxRows'] = 10;
Expand Down
Expand Up @@ -24,7 +24,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -26,7 +26,7 @@ class DatabasesControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Controllers/Server/EnginesControllerTest.php
Expand Up @@ -27,7 +27,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Controllers/Server/PluginsControllerTest.php
Expand Up @@ -26,7 +26,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -32,7 +32,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -24,7 +24,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -25,7 +25,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -26,7 +26,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -22,7 +22,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -22,7 +22,7 @@ class VariablesControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['text_dir'] = 'ltr';
Expand Down
Expand Up @@ -28,7 +28,7 @@ class VariablesControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['text_dir'] = 'ltr';
Expand Down
Expand Up @@ -16,7 +16,7 @@ class FindReplaceControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
Expand Up @@ -25,7 +25,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();

$GLOBALS['server'] = 1;
Expand Down
6 changes: 3 additions & 3 deletions test/classes/CoreTest.php
Expand Up @@ -598,7 +598,7 @@ public function providerTestLinkURL()
public function testSendHeaderLocationWithoutSidWithIis()
{
$GLOBALS['server'] = 0;
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['PMA_Config']->set('PMA_IS_IIS', true);

Expand All @@ -621,7 +621,7 @@ public function testSendHeaderLocationWithoutSidWithIis()
public function testSendHeaderLocationWithoutSidWithoutIis()
{
$GLOBALS['server'] = 0;
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['PMA_Config']->set('PMA_IS_IIS', null);

Expand All @@ -639,7 +639,7 @@ public function testSendHeaderLocationWithoutSidWithoutIis()
public function testSendHeaderLocationIisLongUri()
{
$GLOBALS['server'] = 0;
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['PMA_Config']->set('PMA_IS_IIS', true);

Expand Down
2 changes: 1 addition & 1 deletion test/classes/Database/EventsTest.php
Expand Up @@ -23,7 +23,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Database/RoutinesTest.php
Expand Up @@ -24,7 +24,7 @@ protected function setUp(): void
{
parent::setUp();
parent::setUpEnv();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Database/TriggersTest.php
Expand Up @@ -22,7 +22,7 @@ protected function setUp(): void
{
parent::setUp();
parent::setUpEnv();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['db'] = 'pma_test';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Display/ChangePasswordTest.php
Expand Up @@ -26,7 +26,7 @@ protected function setUp(): void
{
parent::setUp();
//$GLOBALS
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ServerDefault'] = 'PMA_server';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Display/ExportTest.php
Expand Up @@ -30,7 +30,7 @@ protected function setUp(): void
{
parent::setUp();
parent::setLanguage();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['host'] = 'localhost';
$GLOBALS['cfg']['Server']['user'] = 'pma_user';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Display/ResultsTest.php
Expand Up @@ -43,7 +43,7 @@ protected function setUp(): void
$GLOBALS['table'] = 'table';
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
$this->object = new DisplayResults('as', '', 0, '', '');
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['cfg']['Server']['DisableIS'] = false;
Expand Down
2 changes: 1 addition & 1 deletion test/classes/FooterTest.php
Expand Up @@ -38,7 +38,7 @@ protected function setUp(): void
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/HeaderTest.php
Expand Up @@ -38,7 +38,7 @@ protected function setUp(): void
$GLOBALS['server'] = 'server';
$GLOBALS['db'] = 'db';
$GLOBALS['table'] = '';
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/InsertEditTest.php
Expand Up @@ -65,7 +65,7 @@ protected function setUp(): void
$GLOBALS['cfg']['Confirm'] = true;
$GLOBALS['cfg']['LoginCookieValidity'] = 1440;
$GLOBALS['cfg']['enable_drag_drop_import'] = true;
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();

$this->insertEdit = new InsertEdit($GLOBALS['dbi']);
}
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Navigation/NavigationTreeTest.php
Expand Up @@ -28,7 +28,7 @@ protected function setUp(): void
{
parent::setUp();
$GLOBALS['server'] = 1;
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['host'] = 'localhost';
$GLOBALS['cfg']['Server']['user'] = 'user';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/PdfTest.php
Expand Up @@ -20,7 +20,7 @@ class PdfTest extends PmaTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
}

Expand Down
2 changes: 1 addition & 1 deletion test/classes/Plugins/Auth/AuthenticationConfigTest.php
Expand Up @@ -28,7 +28,7 @@ protected function setUp(): void
{
parent::setUp();
parent::setLanguage();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Plugins/Auth/AuthenticationCookieTest.php
Expand Up @@ -40,7 +40,7 @@ protected function setUp(): void
parent::setUp();
parent::setLanguage();
parent::setTheme();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['server'] = 0;
$GLOBALS['text_dir'] = 'ltr';
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Plugins/Auth/AuthenticationHttpTest.php
Expand Up @@ -30,7 +30,7 @@ class AuthenticationHttpTest extends PmaTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Servers'] = [];
$GLOBALS['server'] = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Plugins/Auth/AuthenticationSignonTest.php
Expand Up @@ -31,7 +31,7 @@ class AuthenticationSignonTest extends PmaTestCase
protected function setUp(): void
{
parent::setUp();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
Expand Down
Expand Up @@ -55,7 +55,7 @@ protected function setUp(): void
];

// For Image_*_Inline plugin
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['Server'] = 1;

Expand Down
2 changes: 1 addition & 1 deletion test/classes/Server/PrivilegesTest.php
Expand Up @@ -39,7 +39,7 @@ protected function setUp(): void
{
parent::setUp();
parent::setLanguage();
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfgRelation'] = [];
Expand Down
2 changes: 1 addition & 1 deletion test/classes/Setup/ConfigGeneratorTest.php
Expand Up @@ -38,7 +38,7 @@ public function testGetConfigFile()
{
unset($_SESSION['eol']);

$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();

$GLOBALS['server'] = 0;
$cf = new ConfigFile();
Expand Down
2 changes: 1 addition & 1 deletion test/classes/ThemeManagerTest.php
Expand Up @@ -25,7 +25,7 @@ protected function setUp(): void
$GLOBALS['cfg']['ThemeDefault'] = 'pmahomme';
$GLOBALS['cfg']['ServerDefault'] = 0;
$GLOBALS['server'] = 99;
$GLOBALS['PMA_Config'] = new Config();
parent::setGlobalConfig();

$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
Expand Down

0 comments on commit 0964470

Please sign in to comment.