Continued:
[core.git] / tests / bootstrap.php
1 <?php
2 // Import needed stuff
3 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
4
5 /*
6  * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20  */
21
22 /**
23  * @author Roland Haeder<roland@mxchange.org>
24  */
25 // TODO: check include path
26 //ini_set('include_path', ini_get('include_path'));
27
28 // Bad and ugly:
29 $_SERVER['argv'][1] = 'app=tests';
30
31 // Pre-run own tests
32 require dirname(__DIR__) . '/index.php';
33
34 // Remove it to prevent leak to PHPUnit
35 unset($_SERVER['argv'][1]);
36
37 // For these unit tests, xdebug must be quieted a bit
38 if (extension_loaded('xdebug')) {
39         // Quiet it a bit as this interfers with the nice testing output
40         ini_set('xdebug.show_exception_trace', FALSE);
41 } // END - if
42
43 // Autoload more stuff
44 require dirname(__DIR__) . '/vendor/autoload.php';
45
46 // Quiet DNS resolver as this is not wanted here
47 FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('quiet_dns_resolver', TRUE);