Set package as private in package.json
[phpmyadmin.git] / test / bootstrap-phpstan.php
blobdfeb03e7660a0d7c50af0c73176515b44e768447
1 <?php
2 /**
3 * Bootstrap file for phpstan
4 */
5 declare(strict_types=1);
7 use PhpMyAdmin\Config;
8 use PhpMyAdmin\DatabaseInterface;
9 use PhpMyAdmin\MoTranslator\Loader;
10 use PhpMyAdmin\Tests\Stubs\DbiDummy;
12 if (! defined('ROOT_PATH')) {
13 // phpcs:disable PSR1.Files.SideEffects
14 define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
15 // phpcs:enable
18 // phpcs:disable PSR1.Files.SideEffects
19 define('PHPMYADMIN', true);
20 define('TESTSUITE', true);
21 // phpcs:enable
23 $cfg = [];
25 include_once ROOT_PATH . 'examples/signon-script.php';
26 require_once ROOT_PATH . 'libraries/config.default.php';
27 require_once ROOT_PATH . 'libraries/vendor_config.php';
28 require_once AUTOLOAD_FILE;
30 $GLOBALS['cfg'] = $cfg;
31 $GLOBALS['server'] = 0;
32 $GLOBALS['PMA_Config'] = new Config();
34 // phpcs:disable PSR1.Files.SideEffects
35 define('PMA_VERSION', $GLOBALS['PMA_Config']->get('PMA_VERSION'));
36 define('PMA_MAJOR_VERSION', $GLOBALS['PMA_Config']->get('PMA_MAJOR_VERSION'));
37 define('PROXY_URL', '');
38 define('PROXY_USER', '');
39 define('PROXY_PASS', '');
40 define('PMA_PATH_TO_BASEDIR', '');
41 // phpcs:enable
43 $_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';
44 $GLOBALS['PMA_Config']->checkClient();
45 $GLOBALS['PMA_Config']->checkWebServerOs();
46 $GLOBALS['PMA_Config']->enableBc();// Defines constants, phpstan:level=1
48 Loader::loadFunctions();
50 $GLOBALS['dbi'] = DatabaseInterface::load(new DbiDummy());
52 // for PhpMyAdmin\Plugins\Import\ImportLdi
53 $GLOBALS['plugin_param'] = 'table';