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