Merge pull request #16722 from mauriciofauth/pma-version-removal
Remove the PMA_VERSION constant
This commit is contained in:
commit
faaf7dbb48
@ -699,10 +699,10 @@ var AJAX = {
|
||||
// Clear loaded scripts if they are from another version of phpMyAdmin.
|
||||
// Depends on common params being set before loading scripts in responseHandler
|
||||
if (self.scriptsVersion === null) {
|
||||
self.scriptsVersion = CommonParams.get('PMA_VERSION');
|
||||
} else if (self.scriptsVersion !== CommonParams.get('PMA_VERSION')) {
|
||||
self.scriptsVersion = CommonParams.get('version');
|
||||
} else if (self.scriptsVersion !== CommonParams.get('version')) {
|
||||
self.scripts = [];
|
||||
self.scriptsVersion = CommonParams.get('PMA_VERSION');
|
||||
self.scriptsVersion = CommonParams.get('version');
|
||||
}
|
||||
self.scriptsCompleted = false;
|
||||
self.scriptsToBeFired = [];
|
||||
@ -772,7 +772,7 @@ var AJAX = {
|
||||
|
||||
script.type = 'text/javascript';
|
||||
var file = name.indexOf('vendor/') !== -1 ? name : 'dist/' + name;
|
||||
script.src = 'js/' + file + '?' + 'v=' + encodeURIComponent(CommonParams.get('PMA_VERSION'));
|
||||
script.src = 'js/' + file + '?' + 'v=' + encodeURIComponent(CommonParams.get('version'));
|
||||
script.async = false;
|
||||
script.onload = function () {
|
||||
self.done(name, callback);
|
||||
|
||||
@ -137,9 +137,6 @@ class Config
|
||||
*/
|
||||
public function checkSystem(): void
|
||||
{
|
||||
// All the version handling is now done in the Version class
|
||||
$this->set('PMA_VERSION', Version::VERSION);
|
||||
|
||||
$this->checkWebServerOs();
|
||||
$this->checkWebServer();
|
||||
$this->checkGd2();
|
||||
@ -1052,7 +1049,6 @@ class Config
|
||||
$GLOBALS['is_https'] = $this->get('is_https');
|
||||
|
||||
$defines = [
|
||||
'PMA_VERSION',
|
||||
'PMA_IS_WINDOWS',
|
||||
'PMA_IS_GD2',
|
||||
'PMA_USR_OS',
|
||||
|
||||
@ -247,7 +247,7 @@ class HomeController extends AbstractController
|
||||
'web_server' => $webServer,
|
||||
'show_php_info' => $cfg['ShowPhpInfo'],
|
||||
'is_version_checked' => $cfg['VersionCheck'],
|
||||
'phpmyadmin_version' => PMA_VERSION,
|
||||
'phpmyadmin_version' => Version::VERSION,
|
||||
'phpmyadmin_major_version' => Version::SERIES,
|
||||
'config_storage_message' => $configStorageMessage ?? '',
|
||||
'has_theme_manager' => $cfg['ThemeManager'],
|
||||
|
||||
@ -80,7 +80,7 @@ class ErrorReport
|
||||
$relParams = $this->relation->getRelationsParam();
|
||||
// common params for both, php & js exceptions
|
||||
$report = [
|
||||
'pma_version' => PMA_VERSION,
|
||||
'pma_version' => Version::VERSION,
|
||||
'browser_name' => PMA_USR_BROWSER_AGENT,
|
||||
'browser_version' => PMA_USR_BROWSER_VER,
|
||||
'user_os' => PMA_USR_OS,
|
||||
|
||||
@ -256,7 +256,7 @@ class Header
|
||||
'is_https' => $GLOBALS['config']->isHttps(),
|
||||
'rootPath' => $GLOBALS['config']->getRootPath(),
|
||||
'arg_separator' => Url::getArgSeparator(),
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
];
|
||||
if (isset($GLOBALS['cfg']['Server'], $GLOBALS['cfg']['Server']['auth_type'])) {
|
||||
$params['auth_type'] = $GLOBALS['cfg']['Server']['auth_type'];
|
||||
@ -369,7 +369,7 @@ class Header
|
||||
public function enablePrintView(): void
|
||||
{
|
||||
$this->disableMenuAndConsole();
|
||||
$this->setTitle(__('Print view') . ' - phpMyAdmin ' . PMA_VERSION);
|
||||
$this->setTitle(__('Print view') . ' - phpMyAdmin ' . Version::VERSION);
|
||||
$this->isPrintView = true;
|
||||
}
|
||||
|
||||
@ -710,7 +710,7 @@ class Header
|
||||
*/
|
||||
public static function getVersionParameter(): string
|
||||
{
|
||||
return 'v=' . urlencode(PMA_VERSION);
|
||||
return 'v=' . urlencode(Version::VERSION);
|
||||
}
|
||||
|
||||
private function getVariablesForJavaScript(): string
|
||||
|
||||
@ -44,8 +44,8 @@ EOT;
|
||||
. 'xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" '
|
||||
. 'office:version="1.0">'
|
||||
. '<office:meta>'
|
||||
. '<meta:generator>phpMyAdmin ' . PMA_VERSION . '</meta:generator>'
|
||||
. '<meta:initial-creator>phpMyAdmin ' . PMA_VERSION
|
||||
. '<meta:generator>phpMyAdmin ' . Version::VERSION . '</meta:generator>'
|
||||
. '<meta:initial-creator>phpMyAdmin ' . Version::VERSION
|
||||
. '</meta:initial-creator>'
|
||||
. '<meta:creation-date>' . strftime('%Y-%m-%dT%H:%M:%S')
|
||||
. '</meta:creation-date>'
|
||||
|
||||
@ -65,7 +65,7 @@ class Pdf extends TCPDF
|
||||
$diskcache,
|
||||
$pdfa
|
||||
);
|
||||
$this->SetAuthor('phpMyAdmin ' . PMA_VERSION);
|
||||
$this->SetAuthor('phpMyAdmin ' . Version::VERSION);
|
||||
$this->AddFont('DejaVuSans', '', 'dejavusans.php');
|
||||
$this->AddFont('DejaVuSans', 'B', 'dejavusansb.php');
|
||||
$this->SetFont(self::PMA_PDF_FONT, '', 14);
|
||||
|
||||
@ -15,6 +15,7 @@ use PhpMyAdmin\Properties\Options\Groups\OptionsPropertyRootGroup;
|
||||
use PhpMyAdmin\Properties\Options\Items\BoolPropertyItem;
|
||||
use PhpMyAdmin\Properties\Options\Items\HiddenPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function bin2hex;
|
||||
use function explode;
|
||||
@ -122,7 +123,7 @@ class ExportJson extends ExportPlugin
|
||||
|
||||
$meta = [
|
||||
'type' => 'header',
|
||||
'version' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'comment' => 'Export to JSON plugin for PHPMyAdmin',
|
||||
];
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ use PhpMyAdmin\Properties\Options\Items\RadioPropertyItem;
|
||||
use PhpMyAdmin\Properties\Options\Items\TextPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function count;
|
||||
use function in_array;
|
||||
@ -214,7 +215,7 @@ class ExportLatex extends ExportPlugin
|
||||
global $crlf, $cfg, $dbi;
|
||||
|
||||
$head = '% phpMyAdmin LaTeX Dump' . $crlf
|
||||
. '% version ' . PMA_VERSION . $crlf
|
||||
. '% version ' . Version::VERSION . $crlf
|
||||
. '% https://www.phpmyadmin.net/' . $crlf
|
||||
. '%' . $crlf
|
||||
. '% ' . __('Host:') . ' ' . $cfg['Server']['host'];
|
||||
|
||||
@ -14,6 +14,7 @@ use PhpMyAdmin\Properties\Options\Groups\OptionsPropertyRootGroup;
|
||||
use PhpMyAdmin\Properties\Options\Items\HiddenPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function preg_match;
|
||||
use function preg_replace;
|
||||
@ -88,7 +89,7 @@ class ExportPhparray extends ExportPlugin
|
||||
'<?php' . $GLOBALS['crlf']
|
||||
. '/**' . $GLOBALS['crlf']
|
||||
. ' * Export to PHP Array plugin for PHPMyAdmin' . $GLOBALS['crlf']
|
||||
. ' * @version ' . PMA_VERSION . $GLOBALS['crlf']
|
||||
. ' * @version ' . Version::VERSION . $GLOBALS['crlf']
|
||||
. ' */' . $GLOBALS['crlf'] . $GLOBALS['crlf']
|
||||
);
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ use PhpMyAdmin\SqlParser\Parser;
|
||||
use PhpMyAdmin\SqlParser\Statements\CreateStatement;
|
||||
use PhpMyAdmin\SqlParser\Token;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function bin2hex;
|
||||
use function count;
|
||||
@ -756,7 +757,7 @@ class ExportSql extends ExportPlugin
|
||||
}
|
||||
|
||||
$head = $this->exportComment('phpMyAdmin SQL Dump')
|
||||
. $this->exportComment('version ' . PMA_VERSION)
|
||||
. $this->exportComment('version ' . Version::VERSION)
|
||||
. $this->exportComment('https://www.phpmyadmin.net/')
|
||||
. $this->exportComment();
|
||||
$host_string = __('Host:') . ' ' . $cfg['Server']['host'];
|
||||
|
||||
@ -15,6 +15,7 @@ use PhpMyAdmin\Properties\Options\Items\BoolPropertyItem;
|
||||
use PhpMyAdmin\Properties\Options\Items\HiddenPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function count;
|
||||
use function htmlspecialchars;
|
||||
@ -248,7 +249,7 @@ class ExportXml extends ExportPlugin
|
||||
$head = '<?xml version="1.0" encoding="' . $charset . '"?>' . $crlf
|
||||
. '<!--' . $crlf
|
||||
. '- phpMyAdmin XML Dump' . $crlf
|
||||
. '- version ' . PMA_VERSION . $crlf
|
||||
. '- version ' . Version::VERSION . $crlf
|
||||
. '- https://www.phpmyadmin.net' . $crlf
|
||||
. '-' . $crlf
|
||||
. '- ' . __('Host:') . ' ' . htmlspecialchars($cfg['Server']['host']);
|
||||
|
||||
@ -11,6 +11,7 @@ use PhpMyAdmin\Plugins\Schema\Dia\TableStatsDia;
|
||||
use PhpMyAdmin\Plugins\Schema\ExportRelationSchema;
|
||||
use PhpMyAdmin\Plugins\Schema\Pdf\TableStatsPdf;
|
||||
use PhpMyAdmin\Plugins\Schema\Svg\TableStatsSvg;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function date;
|
||||
use function in_array;
|
||||
@ -65,7 +66,7 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
$this->pageNumber
|
||||
)
|
||||
);
|
||||
$this->diagram->setAuthor('phpMyAdmin ' . PMA_VERSION);
|
||||
$this->diagram->setAuthor('phpMyAdmin ' . Version::VERSION);
|
||||
$this->diagram->setDate(date('j F Y, g:i a'));
|
||||
$this->diagram->setOrientation($this->orientation);
|
||||
$this->diagram->setFont('Verdana', '10');
|
||||
|
||||
@ -11,6 +11,7 @@ use PhpMyAdmin\Plugins\Schema\Dia\TableStatsDia;
|
||||
use PhpMyAdmin\Plugins\Schema\Eps\TableStatsEps;
|
||||
use PhpMyAdmin\Plugins\Schema\ExportRelationSchema;
|
||||
use PhpMyAdmin\Plugins\Schema\Pdf\TableStatsPdf;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function in_array;
|
||||
use function max;
|
||||
@ -78,7 +79,7 @@ class SvgRelationSchema extends ExportRelationSchema
|
||||
$this->pageNumber
|
||||
)
|
||||
);
|
||||
$this->diagram->SetAuthor('phpMyAdmin ' . PMA_VERSION);
|
||||
$this->diagram->SetAuthor('phpMyAdmin ' . Version::VERSION);
|
||||
$this->diagram->setFont('Arial');
|
||||
$this->diagram->setFontSize(16);
|
||||
|
||||
|
||||
@ -115,8 +115,8 @@ class Relation
|
||||
{
|
||||
if (
|
||||
empty($_SESSION['relation'][$GLOBALS['server']])
|
||||
|| empty($_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'])
|
||||
|| $_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] != PMA_VERSION
|
||||
|| empty($_SESSION['relation'][$GLOBALS['server']]['version'])
|
||||
|| $_SESSION['relation'][$GLOBALS['server']]['version'] !== Version::VERSION
|
||||
) {
|
||||
$_SESSION['relation'][$GLOBALS['server']] = $this->checkRelationsParam();
|
||||
}
|
||||
@ -618,8 +618,8 @@ class Relation
|
||||
*/
|
||||
public function checkRelationsParam(): array
|
||||
{
|
||||
$cfgRelation = [];
|
||||
$cfgRelation['PMA_VERSION'] = PMA_VERSION;
|
||||
$cfgRelation = [];
|
||||
$cfgRelation['version'] = Version::VERSION;
|
||||
|
||||
$workToTable = [
|
||||
'relwork' => 'relation',
|
||||
|
||||
@ -156,7 +156,7 @@ class Scripts
|
||||
return $this->template->render('scripts', [
|
||||
'base_dir' => $baseDir,
|
||||
'files' => $this->files,
|
||||
'version' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'code' => $this->code,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Setup;
|
||||
|
||||
use PhpMyAdmin\Config\ConfigFile;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function array_keys;
|
||||
use function count;
|
||||
@ -45,7 +46,7 @@ class ConfigGenerator
|
||||
. '/**' . $crlf
|
||||
. ' * Generated configuration file' . $crlf
|
||||
. ' * Generated by: phpMyAdmin '
|
||||
. $GLOBALS['config']->get('PMA_VERSION')
|
||||
. Version::VERSION
|
||||
. ' setup script' . $crlf
|
||||
. ' * Date: ' . gmdate(DATE_RFC1123) . $crlf
|
||||
. ' */' . $crlf . $crlf;
|
||||
|
||||
@ -8,6 +8,7 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Setup;
|
||||
|
||||
use PhpMyAdmin\Sanitize;
|
||||
use PhpMyAdmin\Version;
|
||||
use PhpMyAdmin\VersionInformation;
|
||||
|
||||
use function htmlspecialchars;
|
||||
@ -162,9 +163,7 @@ class Index
|
||||
return;
|
||||
}
|
||||
|
||||
$version_local = $versionInformation->versionToInt(
|
||||
$GLOBALS['config']->get('PMA_VERSION')
|
||||
);
|
||||
$version_local = $versionInformation->versionToInt(Version::VERSION);
|
||||
if ($version_local === false) {
|
||||
self::messagesSet(
|
||||
'error',
|
||||
|
||||
@ -19,6 +19,7 @@ use function array_sum;
|
||||
use function bin2hex;
|
||||
use function ceil;
|
||||
use function count;
|
||||
use function defined;
|
||||
use function explode;
|
||||
use function htmlspecialchars;
|
||||
use function in_array;
|
||||
@ -32,7 +33,6 @@ use function str_replace;
|
||||
use function strlen;
|
||||
use function strpos;
|
||||
use function ucwords;
|
||||
use function defined;
|
||||
|
||||
/**
|
||||
* Set of functions for the SQL executor
|
||||
|
||||
@ -1890,7 +1890,7 @@ class Util
|
||||
|
||||
$vars['database'] = $GLOBALS['db'];
|
||||
$vars['table'] = $GLOBALS['table'];
|
||||
$vars['phpmyadmin_version'] = 'phpMyAdmin ' . PMA_VERSION;
|
||||
$vars['phpmyadmin_version'] = 'phpMyAdmin ' . Version::VERSION;
|
||||
|
||||
/* Update forced variables */
|
||||
foreach ($updates as $key => $val) {
|
||||
|
||||
@ -33,7 +33,6 @@ $GLOBALS['server'] = 0;
|
||||
$GLOBALS['config'] = new Config();
|
||||
|
||||
// phpcs:disable PSR1.Files.SideEffects
|
||||
define('PMA_VERSION', $GLOBALS['config']->get('PMA_VERSION'));
|
||||
define('PMA_PATH_TO_BASEDIR', '');
|
||||
// phpcs:enable
|
||||
|
||||
|
||||
@ -9,15 +9,13 @@ use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Language;
|
||||
use PhpMyAdmin\LanguageManager;
|
||||
use PhpMyAdmin\Tests\Stubs\Response;
|
||||
use PhpMyAdmin\SqlParser\Translator;
|
||||
use PhpMyAdmin\Tests\Stubs\DbiDummy;
|
||||
use PhpMyAdmin\Tests\Stubs\Response;
|
||||
use PhpMyAdmin\Theme;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use ReflectionClass;
|
||||
|
||||
use function define;
|
||||
use function defined;
|
||||
use function getenv;
|
||||
use function in_array;
|
||||
use function is_array;
|
||||
@ -167,17 +165,6 @@ abstract class AbstractTestCase extends TestCase
|
||||
$GLOBALS['cfg']['ProxyPass'] = $proxyPass;
|
||||
}
|
||||
|
||||
protected function defineVersionConstants(): void
|
||||
{
|
||||
global $config;
|
||||
// Initialize PMA_VERSION variable
|
||||
// phpcs:disable PSR1.Files.SideEffects
|
||||
if (! defined('PMA_VERSION')) {
|
||||
define('PMA_VERSION', $config->get('PMA_VERSION'));
|
||||
}
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
/**
|
||||
* Desctroys the environment built for the test.
|
||||
* Clean all variables
|
||||
|
||||
@ -17,7 +17,6 @@ class BookmarkTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['cfg']['Server']['user'] = 'root';
|
||||
$GLOBALS['cfg']['Server']['pmadb'] = 'phpmyadmin';
|
||||
$GLOBALS['cfg']['Server']['bookmarktable'] = 'pma_bookmark';
|
||||
|
||||
@ -26,7 +26,6 @@ class FormDisplayTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setGlobalConfig();
|
||||
|
||||
@ -24,7 +24,6 @@ class FormTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setGlobalConfig();
|
||||
|
||||
@ -54,7 +54,6 @@ class ConfigTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$_SERVER['HTTP_USER_AGENT'] = '';
|
||||
$this->object = new Config();
|
||||
@ -88,7 +87,7 @@ class ConfigTest extends AbstractTestCase
|
||||
{
|
||||
$this->object->checkSystem();
|
||||
|
||||
$this->assertNotEmpty($this->object->get('PMA_VERSION'));
|
||||
$this->assertIsBool($this->object->get('PMA_IS_WINDOWS'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -751,7 +750,6 @@ class ConfigTest extends AbstractTestCase
|
||||
$this->object->enableBc();
|
||||
|
||||
$defines = [
|
||||
'PMA_VERSION',
|
||||
'PMA_IS_WINDOWS',
|
||||
'PMA_IS_GD2',
|
||||
'PMA_USR_OS',
|
||||
|
||||
@ -19,7 +19,6 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
|
||||
@ -59,7 +59,6 @@ class StructureControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setTheme();
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
|
||||
@ -12,6 +12,7 @@ use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Tests\Stubs\Response;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
class ExportTemplateControllerTest extends AbstractTestCase
|
||||
{
|
||||
@ -40,7 +41,7 @@ class ExportTemplateControllerTest extends AbstractTestCase
|
||||
$GLOBALS['PMA_PHP_SELF'] = '';
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'exporttemplateswork' => true,
|
||||
'db' => 'db',
|
||||
'export_templates' => 'table',
|
||||
|
||||
@ -19,7 +19,6 @@ class BinlogControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
parent::setGlobalConfig();
|
||||
parent::setTheme();
|
||||
|
||||
@ -19,7 +19,6 @@ class CollationsControllerTest extends AbstractTestCase
|
||||
parent::setUp();
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$GLOBALS['config']->enableBc();
|
||||
|
||||
|
||||
@ -113,7 +113,6 @@ class DatabasesControllerTest extends AbstractTestCase
|
||||
|
||||
public function testCreateDatabaseAction(): void
|
||||
{
|
||||
parent::defineVersionConstants();
|
||||
$dbi = $this->getMockBuilder(DatabaseInterface::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
@ -23,7 +23,6 @@ class EnginesControllerTest extends AbstractTestCase
|
||||
parent::setUp();
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$GLOBALS['config']->enableBc();
|
||||
|
||||
|
||||
@ -21,7 +21,6 @@ class PluginsControllerTest extends AbstractTestCase
|
||||
parent::setUp();
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$GLOBALS['config']->enableBc();
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ class VariablesControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setGlobalConfig();
|
||||
$GLOBALS['config']->enableBc();
|
||||
parent::setTheme();
|
||||
|
||||
@ -23,7 +23,6 @@ class VariablesControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setGlobalConfig();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
|
||||
@ -18,7 +18,6 @@ class FindReplaceControllerTest extends AbstractTestCase
|
||||
parent::setUp();
|
||||
parent::setLanguage();
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$GLOBALS['config']->enableBc();
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@ class IndexesControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setTheme();
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
|
||||
@ -27,7 +27,6 @@ class RelationControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setTheme();
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ namespace PhpMyAdmin\Tests\Controllers\Table;
|
||||
use PhpMyAdmin\Controllers\Table\ReplaceController;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
class ReplaceControllerTest extends AbstractTestCase
|
||||
{
|
||||
@ -14,7 +15,6 @@ class ReplaceControllerTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::loadDefaultConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
parent::setGlobalDbi();
|
||||
@ -31,7 +31,7 @@ class ReplaceControllerTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -42,7 +42,6 @@ class SearchControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setTheme();
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ class StructureControllerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setTheme();
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
|
||||
@ -25,7 +25,6 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::setLanguage();
|
||||
parent::loadDefaultConfig();
|
||||
|
||||
@ -9,6 +9,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Types;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function array_slice;
|
||||
|
||||
@ -89,7 +90,6 @@ class CentralColumnsTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['cfg']['Server']['user'] = 'pma_user';
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = true;
|
||||
$GLOBALS['cfg']['MaxRows'] = 10;
|
||||
@ -103,7 +103,7 @@ class CentralColumnsTest extends AbstractTestCase
|
||||
//$_SESSION
|
||||
$GLOBALS['server'] = 1;
|
||||
$_SESSION['relation'][1] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'centralcolumnswork' => true,
|
||||
'relwork' => 1,
|
||||
'db' => 'phpmyadmin',
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\Database\Designer\Common;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
class CommonTest extends AbstractTestCase
|
||||
{
|
||||
@ -20,12 +21,11 @@ class CommonTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 1;
|
||||
$_SESSION = [
|
||||
'relation' => [
|
||||
'1' => [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'db' => 'pmadb',
|
||||
'pdf_pages' => 'pdf_pages',
|
||||
'pdfwork' => true,
|
||||
|
||||
@ -9,6 +9,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
|
||||
class DesignerTest extends AbstractTestCase
|
||||
@ -22,7 +23,6 @@ class DesignerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
@ -37,7 +37,7 @@ class DesignerTest extends AbstractTestCase
|
||||
$_SESSION = [
|
||||
'relation' => [
|
||||
'1' => [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'db' => 'pmadb',
|
||||
'pdf_pages' => 'pdf_pages',
|
||||
'pdfwork' => true,
|
||||
|
||||
@ -24,7 +24,6 @@ class QbeTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['db'] = 'pma_test';
|
||||
$this->object = new Qbe(new Relation($GLOBALS['dbi']), new Template(), $GLOBALS['dbi'], 'pma_test');
|
||||
|
||||
@ -23,7 +23,6 @@ class RoutinesTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
$GLOBALS['config']->enableBc();
|
||||
|
||||
@ -21,7 +21,6 @@ class TriggersTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::setGlobalConfig();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
$GLOBALS['server'] = 0;
|
||||
|
||||
@ -30,7 +30,6 @@ class DatabaseInterfaceTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::loadDefaultConfig();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 0;
|
||||
$extension = new DbiDummy();
|
||||
$this->dbi = new DatabaseInterface($extension);
|
||||
|
||||
@ -17,6 +17,7 @@ use PhpMyAdmin\SqlParser\Parser;
|
||||
use PhpMyAdmin\SqlParser\Utils\Query;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Version;
|
||||
use stdClass;
|
||||
|
||||
use function count;
|
||||
@ -48,7 +49,6 @@ class ResultsTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setGlobalConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
@ -1094,7 +1094,7 @@ class ResultsTest extends AbstractTestCase
|
||||
{
|
||||
// Fake relation settings
|
||||
$_SESSION['tmpval']['relational_display'] = 'K';
|
||||
$_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['mimework'] = true;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['column_info'] = 'column_info';
|
||||
$GLOBALS['cfg']['BrowseMIME'] = true;
|
||||
|
||||
@ -9,6 +9,7 @@ use PhpMyAdmin\ErrorReport;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Utils\HttpRequest;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function define;
|
||||
use function defined;
|
||||
@ -33,7 +34,6 @@ class ErrorReportTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
$GLOBALS['cfg']['ProxyUrl'] = '';
|
||||
@ -85,7 +85,7 @@ class ErrorReportTest extends AbstractTestCase
|
||||
];
|
||||
|
||||
$report = [
|
||||
'pma_version' => PMA_VERSION,
|
||||
'pma_version' => Version::VERSION,
|
||||
'browser_name' => PMA_USR_BROWSER_AGENT,
|
||||
'browser_version' => PMA_USR_BROWSER_VER,
|
||||
'user_os' => PMA_USR_OS,
|
||||
@ -190,7 +190,7 @@ class ErrorReportTest extends AbstractTestCase
|
||||
$_POST['description'] = 'description';
|
||||
|
||||
$report = [
|
||||
'pma_version' => PMA_VERSION,
|
||||
'pma_version' => Version::VERSION,
|
||||
'browser_name' => PMA_USR_BROWSER_AGENT,
|
||||
'browser_version' => PMA_USR_BROWSER_VER,
|
||||
'user_os' => PMA_USR_OS,
|
||||
|
||||
@ -22,7 +22,6 @@ class HeaderTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::setLanguage();
|
||||
if (! defined('PMA_IS_WINDOWS')) {
|
||||
|
||||
@ -40,7 +40,6 @@ class InsertEditTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setGlobalConfig();
|
||||
parent::loadDefaultConfig();
|
||||
|
||||
@ -18,7 +18,6 @@ class MenuTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::loadDefaultConfig();
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\Navigation\NodeFactory;
|
||||
use PhpMyAdmin\Navigation\Nodes\NodeDatabaseChild;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Version;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class NodeDatabaseChildTest extends AbstractTestCase
|
||||
@ -27,13 +28,12 @@ class NodeDatabaseChildTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
parent::setLanguage();
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
$_SESSION['relation'][1]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][1]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][1]['navwork'] = true;
|
||||
$this->object = $this->getMockForAbstractClass(
|
||||
NodeDatabaseChild::class,
|
||||
|
||||
@ -16,7 +16,6 @@ class NodeDatabaseTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
|
||||
|
||||
@ -27,7 +27,6 @@ class NormalizationTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['cfg']['LimitChars'] = 50;
|
||||
$GLOBALS['cfg']['ServerDefault'] = 'PMA_server';
|
||||
$GLOBALS['cfg']['ShowHint'] = true;
|
||||
|
||||
@ -35,7 +35,6 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
parent::setGlobalConfig();
|
||||
|
||||
@ -27,7 +27,6 @@ class AuthenticationSignonTest extends AbstractNetworkTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setGlobalConfig();
|
||||
parent::setTheme();
|
||||
|
||||
@ -33,7 +33,6 @@ class ExportCsvTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['db'] = '';
|
||||
|
||||
@ -14,6 +14,7 @@ use PhpMyAdmin\Properties\Options\Items\TextPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
|
||||
@ -35,7 +36,6 @@ class ExportHtmlwordTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$this->object = new ExportHtmlword();
|
||||
@ -473,7 +473,7 @@ class ExportHtmlwordTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
@ -563,7 +563,7 @@ class ExportHtmlwordTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
@ -632,7 +632,7 @@ class ExportHtmlwordTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => false,
|
||||
'commwork' => false,
|
||||
'mimework' => false,
|
||||
|
||||
@ -10,6 +10,7 @@ use PhpMyAdmin\Properties\Options\Groups\OptionsPropertyRootGroup;
|
||||
use PhpMyAdmin\Properties\Options\Items\HiddenPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
|
||||
@ -29,7 +30,6 @@ class ExportJsonTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
$GLOBALS['output_charset_conversion'] = false;
|
||||
@ -129,7 +129,7 @@ class ExportJsonTest extends AbstractTestCase
|
||||
|
||||
$this->expectOutputString(
|
||||
"[\n"
|
||||
. '{"type":"header","version":"' . PMA_VERSION
|
||||
. '{"type":"header","version":"' . Version::VERSION
|
||||
. '","comment":"Export to JSON plugin for PHPMyAdmin"},'
|
||||
. "\n"
|
||||
);
|
||||
|
||||
@ -14,6 +14,7 @@ use PhpMyAdmin\Properties\Options\Items\TextPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
|
||||
@ -35,7 +36,6 @@ class ExportLatexTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
@ -672,7 +672,7 @@ class ExportLatexTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
@ -779,7 +779,7 @@ class ExportLatexTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
@ -857,7 +857,7 @@ class ExportLatexTest extends AbstractTestCase
|
||||
$GLOBALS['cfg']['Server']['verbose'] = 'verb';
|
||||
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => false,
|
||||
'commwork' => false,
|
||||
'mimework' => false,
|
||||
|
||||
@ -34,7 +34,6 @@ class ExportMediawikiTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
|
||||
@ -43,7 +43,6 @@ class ExportOdsTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
$GLOBALS['output_charset_conversion'] = false;
|
||||
|
||||
@ -15,6 +15,7 @@ use PhpMyAdmin\Properties\Options\Items\TextPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
use stdClass;
|
||||
@ -42,7 +43,6 @@ class ExportOdtTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
@ -683,7 +683,7 @@ class ExportOdtTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
@ -783,7 +783,7 @@ class ExportOdtTest extends AbstractTestCase
|
||||
$GLOBALS['odt_buffer'] = '';
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
|
||||
@ -31,7 +31,6 @@ class ExportPdfTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
$GLOBALS['output_charset_conversion'] = false;
|
||||
|
||||
@ -31,7 +31,6 @@ class ExportPhparrayTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
|
||||
@ -19,6 +19,7 @@ use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Table;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
use stdClass;
|
||||
@ -49,7 +50,6 @@ class ExportSqlTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['db'] = '';
|
||||
@ -1166,7 +1166,7 @@ class ExportSqlTest extends AbstractTestCase
|
||||
public function testGetTableComments(): void
|
||||
{
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
|
||||
@ -14,6 +14,7 @@ use PhpMyAdmin\Properties\Options\Items\TextPropertyItem;
|
||||
use PhpMyAdmin\Properties\Plugins\ExportPluginProperties;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
|
||||
@ -35,7 +36,6 @@ class ExportTexytextTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
@ -331,7 +331,7 @@ class ExportTexytextTest extends AbstractTestCase
|
||||
|
||||
$GLOBALS['cfgRelation']['relation'] = true;
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => true,
|
||||
'commwork' => true,
|
||||
'mimework' => true,
|
||||
|
||||
@ -34,7 +34,6 @@ class ExportXmlTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
|
||||
@ -31,7 +31,6 @@ class ExportYamlTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['output_kanji_conversion'] = false;
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Plugins\Schema\Dia\DiaRelationSchema;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
/**
|
||||
* @requires extension xmlwriter
|
||||
@ -26,7 +27,6 @@ class DiaRelationSchemaTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$_REQUEST['page_number'] = 33;
|
||||
$_REQUEST['dia_show_color'] = true;
|
||||
$_REQUEST['dia_show_keys'] = true;
|
||||
@ -44,7 +44,7 @@ class DiaRelationSchemaTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Plugins\Schema\Eps\EpsRelationSchema;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
class EpsRelationSchemaTest extends AbstractTestCase
|
||||
{
|
||||
@ -23,7 +24,6 @@ class EpsRelationSchemaTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$_REQUEST['page_number'] = 33;
|
||||
$_REQUEST['eps_show_color'] = true;
|
||||
$_REQUEST['eps_show_keys'] = true;
|
||||
@ -42,7 +42,7 @@ class EpsRelationSchemaTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -21,7 +21,6 @@ class ExportRelationSchemaTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$_REQUEST['page_number'] = 33;
|
||||
$this->object = new ExportRelationSchema('information_schema', null);
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Plugins\Schema\Pdf\PdfRelationSchema;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
class PdfRelationSchemaTest extends AbstractTestCase
|
||||
{
|
||||
@ -23,7 +24,6 @@ class PdfRelationSchemaTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$_REQUEST['page_number'] = 33;
|
||||
$_REQUEST['pdf_show_grid'] = true;
|
||||
$_REQUEST['pdf_show_color'] = true;
|
||||
@ -50,7 +50,7 @@ class PdfRelationSchemaTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Plugins\Schema\Svg\SvgRelationSchema;
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
/**
|
||||
* @requires extension xmlwriter
|
||||
@ -26,7 +27,6 @@ class SvgRelationSchemaTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$_REQUEST['page_number'] = 33;
|
||||
$_REQUEST['svg_show_color'] = true;
|
||||
$_REQUEST['svg_show_keys'] = true;
|
||||
@ -44,7 +44,7 @@ class SvgRelationSchemaTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -6,6 +6,7 @@ namespace PhpMyAdmin\Tests;
|
||||
|
||||
use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\RelationCleanup;
|
||||
use PhpMyAdmin\Version;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
use function array_merge;
|
||||
@ -29,11 +30,10 @@ class RelationCleanupTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 1;
|
||||
$_SESSION['relation'] = [];
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'relwork' => false,
|
||||
'displaywork' => false,
|
||||
'bookmarkwork' => false,
|
||||
|
||||
@ -24,7 +24,6 @@ class RelationTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = 'db';
|
||||
|
||||
@ -8,6 +8,7 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests;
|
||||
|
||||
use PhpMyAdmin\Scripts;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionProperty;
|
||||
|
||||
use function define;
|
||||
@ -61,7 +62,7 @@ class ScriptsTest extends AbstractTestCase
|
||||
$actual = $this->object->getDisplay();
|
||||
|
||||
$this->assertStringContainsString(
|
||||
'src="js/dist/common.js?v=' . rawurlencode(PMA_VERSION) . '"',
|
||||
'src="js/dist/common.js?v=' . rawurlencode(Version::VERSION) . '"',
|
||||
$actual
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
|
||||
@ -16,6 +16,7 @@ use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Tests\Stubs\DbiDummy;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Version;
|
||||
use stdClass;
|
||||
|
||||
use function htmlspecialchars;
|
||||
@ -37,7 +38,6 @@ class PrivilegesTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setGlobalConfig();
|
||||
parent::setTheme();
|
||||
@ -63,7 +63,7 @@ class PrivilegesTest extends AbstractTestCase
|
||||
$_POST['pred_password'] = 'none';
|
||||
//$_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'db' => 'pmadb',
|
||||
'users' => 'users',
|
||||
'usergroups' => 'usergroups',
|
||||
@ -1663,7 +1663,7 @@ class PrivilegesTest extends AbstractTestCase
|
||||
$_POST['old_hostname'] = 'old_hostname';
|
||||
$_POST['old_username'] = 'old_username';
|
||||
$_SESSION['relation'][1] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'bookmarkwork' => false,
|
||||
'historywork' => false,
|
||||
'recentwork' => false,
|
||||
|
||||
@ -8,6 +8,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Server\UserGroups;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function htmlspecialchars;
|
||||
|
||||
@ -19,13 +20,12 @@ class UserGroupsTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
$GLOBALS['cfg']['ActionLinksMode'] = 'both';
|
||||
|
||||
$GLOBALS['server'] = 1;
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'db' => 'pmadb',
|
||||
'users' => 'users',
|
||||
'usergroups' => 'usergroups',
|
||||
|
||||
@ -10,6 +10,7 @@ namespace PhpMyAdmin\Tests\Setup;
|
||||
use PhpMyAdmin\Config\ConfigFile;
|
||||
use PhpMyAdmin\Setup\ConfigGenerator;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionClass;
|
||||
|
||||
class ConfigGeneratorTest extends AbstractTestCase
|
||||
@ -58,8 +59,7 @@ class ConfigGeneratorTest extends AbstractTestCase
|
||||
"<?php\n" .
|
||||
"/**\n" .
|
||||
" * Generated configuration file\n" .
|
||||
' * Generated by: phpMyAdmin ' .
|
||||
$GLOBALS['config']->get('PMA_VERSION') . " setup script\n",
|
||||
' * Generated by: phpMyAdmin ' . Version::VERSION . " setup script\n",
|
||||
$result
|
||||
);
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ class FormProcessingTest extends AbstractNetworkTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setLanguage();
|
||||
$GLOBALS['server'] = 1;
|
||||
|
||||
@ -11,6 +11,7 @@ use PhpMyAdmin\Html\MySQLDocumentation;
|
||||
use PhpMyAdmin\SqlQueryForm;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function htmlspecialchars;
|
||||
|
||||
@ -30,7 +31,6 @@ class SqlQueryFormTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
$this->sqlQueryForm = new SqlQueryForm(new Template());
|
||||
|
||||
@ -58,7 +58,7 @@ class SqlQueryFormTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][0] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -24,7 +24,6 @@ class SqlTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::loadDefaultConfig();
|
||||
parent::setTheme();
|
||||
|
||||
@ -21,9 +21,10 @@ use function is_bool;
|
||||
use function preg_replace;
|
||||
use function str_replace;
|
||||
use function trim;
|
||||
|
||||
use const MYSQLI_TYPE_DATETIME;
|
||||
use const MYSQLI_TYPE_DECIMAL;
|
||||
use const MYSQLI_TYPE_STRING;
|
||||
use const MYSQLI_TYPE_DATETIME;
|
||||
|
||||
/**
|
||||
* Fake database driver for testing purposes
|
||||
|
||||
@ -9,6 +9,7 @@ namespace PhpMyAdmin\Tests;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\SystemDatabase;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
/**
|
||||
* Tests for libraries/SystemDatabase.php
|
||||
@ -30,7 +31,6 @@ class SystemDatabaseTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
/**
|
||||
* SET these to avoid undefine d index error
|
||||
*/
|
||||
@ -47,7 +47,7 @@ class SystemDatabaseTest extends AbstractTestCase
|
||||
|
||||
//_SESSION
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'table_coords' => 'table_name',
|
||||
'displaywork' => 'displaywork',
|
||||
'db' => 'information_schema',
|
||||
|
||||
@ -23,7 +23,6 @@ class TableTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::loadDefaultConfig();
|
||||
|
||||
/**
|
||||
|
||||
@ -15,7 +15,6 @@ class ThemeManagerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setGlobalConfig();
|
||||
$GLOBALS['cfg']['ThemePerServer'] = false;
|
||||
$GLOBALS['cfg']['ThemeDefault'] = 'pmahomme';
|
||||
|
||||
@ -25,7 +25,6 @@ class ThemeTest extends AbstractTestCase
|
||||
global $theme;
|
||||
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$this->object = new Theme();
|
||||
$this->backup = $theme;
|
||||
|
||||
@ -7,6 +7,7 @@ namespace PhpMyAdmin\Tests;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Tracker;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Version;
|
||||
use ReflectionMethod;
|
||||
use ReflectionProperty;
|
||||
|
||||
@ -20,7 +21,6 @@ class TrackerTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
/**
|
||||
* SET these to avoid undefined index error
|
||||
*/
|
||||
@ -33,7 +33,7 @@ class TrackerTest extends AbstractTestCase
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'db' => 'pmadb',
|
||||
'tracking' => 'tracking',
|
||||
];
|
||||
@ -75,7 +75,7 @@ class TrackerTest extends AbstractTestCase
|
||||
Tracker::enable();
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'trackingwork' => false,
|
||||
];
|
||||
|
||||
@ -84,7 +84,7 @@ class TrackerTest extends AbstractTestCase
|
||||
);
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'trackingwork' => true,
|
||||
'db' => 'pmadb',
|
||||
'tracking' => 'tracking',
|
||||
@ -149,7 +149,7 @@ class TrackerTest extends AbstractTestCase
|
||||
|
||||
Tracker::enable();
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['trackingwork'] = false;
|
||||
|
||||
$this->assertFalse(
|
||||
|
||||
@ -9,6 +9,7 @@ use PhpMyAdmin\SqlQueryForm;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Tracking;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function htmlspecialchars;
|
||||
use function sprintf;
|
||||
@ -26,7 +27,6 @@ class TrackingTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
|
||||
global $config;
|
||||
@ -43,7 +43,7 @@ class TrackingTest extends AbstractTestCase
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'] = 'DELETE';
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']] = [
|
||||
'PMA_VERSION' => PMA_VERSION,
|
||||
'version' => Version::VERSION,
|
||||
'db' => 'pmadb',
|
||||
'tracking' => 'tracking',
|
||||
'trackingwork' => true,
|
||||
|
||||
@ -9,6 +9,7 @@ namespace PhpMyAdmin\Tests;
|
||||
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Transformations;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
/**
|
||||
* tests for transformation wrappers
|
||||
@ -24,7 +25,6 @@ class TransformationsTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['table'] = 'table';
|
||||
$GLOBALS['db'] = 'db';
|
||||
$GLOBALS['cfg'] = [
|
||||
@ -198,7 +198,7 @@ class TransformationsTest extends AbstractTestCase
|
||||
*/
|
||||
public function testGetMime(): void
|
||||
{
|
||||
$_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['mimework'] = true;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['db'] = 'pmadb';
|
||||
$_SESSION['relation'][$GLOBALS['server']]['column_info'] = 'column_info';
|
||||
@ -246,7 +246,7 @@ class TransformationsTest extends AbstractTestCase
|
||||
$actual
|
||||
);
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['column_info'] = 'column_info';
|
||||
$_SESSION['relation'][$GLOBALS['server']]['db'] = 'pmadb';
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ class TwoFactorTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setTheme();
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = 'db';
|
||||
|
||||
@ -9,6 +9,7 @@ use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\UserPreferences;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function json_encode;
|
||||
use function time;
|
||||
@ -25,7 +26,6 @@ class UserPreferencesTest extends AbstractNetworkTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
parent::loadDefaultConfig();
|
||||
parent::defineVersionConstants();
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
$GLOBALS['PMA_PHP_SELF'] = '/phpmyadmin/';
|
||||
@ -62,7 +62,7 @@ class UserPreferencesTest extends AbstractNetworkTestCase
|
||||
*/
|
||||
public function testLoad(): void
|
||||
{
|
||||
$_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['version'] = Version::VERSION;
|
||||
|
||||
$_SESSION['relation'][$GLOBALS['server']]['userconfigwork'] = null;
|
||||
unset($_SESSION['userconfig']);
|
||||
@ -142,7 +142,7 @@ class UserPreferencesTest extends AbstractNetworkTestCase
|
||||
public function testSave(): void
|
||||
{
|
||||
$GLOBALS['server'] = 2;
|
||||
$_SESSION['relation'][2]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][2]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][2]['userconfigwork'] = null;
|
||||
unset($_SESSION['userconfig']);
|
||||
|
||||
@ -308,7 +308,7 @@ class UserPreferencesTest extends AbstractNetworkTestCase
|
||||
*/
|
||||
public function testPersistOption(): void
|
||||
{
|
||||
$_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'] = PMA_VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['version'] = Version::VERSION;
|
||||
$_SESSION['relation'][$GLOBALS['server']]['userconfigwork'] = null;
|
||||
$_SESSION['userconfig'] = [];
|
||||
$_SESSION['userconfig']['ts'] = '123';
|
||||
|
||||
@ -12,6 +12,7 @@ use PhpMyAdmin\SqlParser\Context;
|
||||
use PhpMyAdmin\SqlParser\Token;
|
||||
use PhpMyAdmin\Util;
|
||||
use PhpMyAdmin\Utils\SessionCache;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function date_default_timezone_get;
|
||||
use function date_default_timezone_set;
|
||||
@ -42,7 +43,6 @@ class UtilTest extends AbstractTestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
parent::defineVersionConstants();
|
||||
parent::setLanguage();
|
||||
parent::setTheme();
|
||||
parent::loadDefaultConfig();
|
||||
@ -643,8 +643,6 @@ class UtilTest extends AbstractTestCase
|
||||
$GLOBALS['db'] = 'database';
|
||||
$GLOBALS['table'] = 'table';
|
||||
|
||||
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
|
||||
|
||||
$this->assertEquals(
|
||||
$out,
|
||||
Util::expandUserString($in)
|
||||
@ -689,7 +687,7 @@ class UtilTest extends AbstractTestCase
|
||||
],
|
||||
[
|
||||
'@PHPMYADMIN@',
|
||||
'phpMyAdmin PMA_VERSION',
|
||||
'phpMyAdmin ' . Version::VERSION,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ namespace PhpMyAdmin\Tests;
|
||||
|
||||
use PhpMyAdmin\VersionInformation;
|
||||
use stdClass;
|
||||
|
||||
use function count;
|
||||
|
||||
class VersionInformationTest extends AbstractTestCase
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user