Remove warnings about operating with Mac OS Classic, since that is quite old at this...
[phpmyadmin.git] / test / bootstrap-dist.php
blob3ba5119c916d9d81a8c9f4c5b79f40206660a730
1 <?php
2 /**
3 * Bootstrap for phpMyAdmin tests
4 */
6 declare(strict_types=1);
8 use PhpMyAdmin\Config;
9 use PhpMyAdmin\DatabaseInterface;
10 use PhpMyAdmin\MoTranslator\Loader;
11 use PhpMyAdmin\Tests\Stubs\DbiDummy;
13 if (! defined('ROOT_PATH')) {
14 // phpcs:disable PSR1.Files.SideEffects
15 define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
16 // phpcs:enable
19 /**
20 * Set precision to sane value, with higher values
21 * things behave slightly unexpectedly, for example
22 * round(1.2, 2) returns 1.199999999999999956.
24 ini_set('precision', '14');
26 // Let PHP complain about all errors
27 error_reporting(E_ALL);
29 // Ensure PHP has set timezone
30 date_default_timezone_set('UTC');
32 // Adding phpMyAdmin sources to include path
33 set_include_path(
34 get_include_path() . PATH_SEPARATOR . dirname((string) realpath('../index.php'))
37 // Setting constants for testing
38 // phpcs:disable PSR1.Files.SideEffects
39 if (! defined('PHPMYADMIN')) {
40 define('PHPMYADMIN', 1);
41 define('TESTSUITE', 1);
43 // phpcs:enable
45 require_once ROOT_PATH . 'libraries/vendor_config.php';
46 require_once AUTOLOAD_FILE;
47 Loader::loadFunctions();
49 $GLOBALS['PMA_Config'] = new Config();
50 $GLOBALS['PMA_Config']->set('environment', 'development');
51 $GLOBALS['cfg']['environment'] = 'development';
53 /* Load Database interface */
54 $GLOBALS['dbi'] = DatabaseInterface::load(new DbiDummy());