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

bootstrap-phpstan.php « test - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ba1136f350a74042c92455a2747f674c444953f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
 * Bootstrap file for phpstan
 *
 * @package PhpMyAdmin-test
 */
declare(strict_types=1);

use PhpMyAdmin\Config;
use PhpMyAdmin\DatabaseInterface;
use PhpMyAdmin\MoTranslator\Loader;
use PhpMyAdmin\Tests\Stubs\DbiDummy;

if (! defined('ROOT_PATH')) {
    define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
}

define('PHPMYADMIN', true);
define('TESTSUITE', true);

$cfg = [];

include_once ROOT_PATH . 'examples/signon-script.php';
require_once ROOT_PATH . 'libraries/config.default.php';
require_once ROOT_PATH . 'libraries/vendor_config.php';
require_once AUTOLOAD_FILE;

$GLOBALS['cfg'] = $cfg;
$GLOBALS['server'] = 0;
$GLOBALS['PMA_Config'] = new Config();
define('PMA_VERSION', $GLOBALS['PMA_Config']->get('PMA_VERSION'));
define('PMA_MAJOR_VERSION', $GLOBALS['PMA_Config']->get('PMA_MAJOR_VERSION'));
define('PROXY_URL', '');
define('PROXY_USER', '');
define('PROXY_PASS', '');
define('PMA_PATH_TO_BASEDIR', '');

$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36';
$GLOBALS['PMA_Config']->checkClient();
$GLOBALS['PMA_Config']->checkWebServerOs();
$GLOBALS['PMA_Config']->enableBc();// Defines constants, phpstan:level=1

Loader::loadFunctions();

$GLOBALS['dbi'] = DatabaseInterface::load(new DbiDummy());

// for PhpMyAdmin\Plugins\Import\ImportLdi
$GLOBALS['plugin_param'] = 'table';