Fix missing globals in RTE tests
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
d00665c652
commit
9c505961df
@ -1594,6 +1594,13 @@ class DbiDummy implements DbiExtension
|
||||
. "WHERE `SCHEMA_NAME` < 'db' ) t",
|
||||
'result' => [],
|
||||
],
|
||||
[
|
||||
'query' => "SELECT (COUNT(DB_first_level) DIV 100) * 100 from "
|
||||
. "( SELECT distinct SUBSTRING_INDEX(SCHEMA_NAME, '_', 1) "
|
||||
. "DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA "
|
||||
. "WHERE `SCHEMA_NAME` < 'pma_test' ) t",
|
||||
'result' => [],
|
||||
],
|
||||
[
|
||||
'query' => "SELECT `SCHEMA_NAME` FROM "
|
||||
. "`INFORMATION_SCHEMA`.`SCHEMATA`, "
|
||||
|
||||
@ -9,6 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Rte;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Rte\Events;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -32,21 +33,13 @@ class EventsTest extends TestCase
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
$GLOBALS['PMA_Config'] = new Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['db'] = 'db';
|
||||
$GLOBALS['table'] = 'table';
|
||||
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
|
||||
$GLOBALS['cfg']['AllowThirdPartyFraming'] = false;
|
||||
$GLOBALS['cfg']['SendErrorReports'] = 'ask';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['cfg']['ShowDatabasesNavigationAsTree'] = true;
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'browse';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = 'structure';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2'] = '';
|
||||
$GLOBALS['cfg']['LimitChars'] = 50;
|
||||
$GLOBALS['cfg']['Confirm'] = true;
|
||||
$GLOBALS['cfg']['LoginCookieValidity'] = 1440;
|
||||
$GLOBALS['cfg']['ServerDefault'] = '';
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
$GLOBALS['tear_down']['server'] = true;
|
||||
|
||||
$this->events = new Events($GLOBALS['dbi']);
|
||||
|
||||
@ -9,6 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Rte;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Rte\Routines;
|
||||
@ -34,27 +35,13 @@ class RoutinesTest extends TestCase
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
$GLOBALS['cfg']['ShowFunctionFields'] = false;
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
$GLOBALS['cfg']['DefaultFunctions']['FUNC_NUMBER'] = '';
|
||||
$GLOBALS['cfg']['DefaultFunctions']['FUNC_DATE'] = '';
|
||||
$GLOBALS['cfg']['DefaultFunctions']['FUNC_SPATIAL'] = 'GeomFromText';
|
||||
$GLOBALS['cfg']['AllowThirdPartyFraming'] = false;
|
||||
$GLOBALS['cfg']['SendErrorReports'] = 'ask';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['cfg']['ShowDatabasesNavigationAsTree'] = true;
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'browse';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = 'structure';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2'] = '';
|
||||
$GLOBALS['cfg']['LimitChars'] = 50;
|
||||
$GLOBALS['cfg']['Confirm'] = true;
|
||||
$GLOBALS['cfg']['LoginCookieValidity'] = 1440;
|
||||
$GLOBALS['PMA_Config'] = new Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['db'] = 'db';
|
||||
$GLOBALS['table'] = 'table';
|
||||
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
|
||||
$GLOBALS['pmaThemePath'] = $GLOBALS['PMA_Theme']->getPath();
|
||||
|
||||
$this->routines = new Routines($GLOBALS['dbi']);
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Rte;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Rte\Triggers;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -32,18 +33,9 @@ class TriggersTest extends TestCase
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
$GLOBALS['cfg']['ServerDefault'] = '';
|
||||
$GLOBALS['cfg']['AllowThirdPartyFraming'] = false;
|
||||
$GLOBALS['cfg']['SendErrorReports'] = 'ask';
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['cfg']['ShowDatabasesNavigationAsTree'] = true;
|
||||
$GLOBALS['cfg']['DefaultTabTable'] = 'browse';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = 'structure';
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable2'] = '';
|
||||
$GLOBALS['cfg']['LimitChars'] = 50;
|
||||
$GLOBALS['cfg']['Confirm'] = true;
|
||||
$GLOBALS['cfg']['LoginCookieValidity'] = 1440;
|
||||
$GLOBALS['cfg']['NaturalOrder'] = false;
|
||||
$GLOBALS['PMA_Config'] = new Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
$GLOBALS['db'] = 'pma_test';
|
||||
$GLOBALS['table'] = 'table';
|
||||
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user