forked from NethServer/nethgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
38 lines (33 loc) · 919 Bytes
/
bootstrap.php
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
<?php
/**
* PHPUnit bootstrap file
*
* Execute
*
* phpunit --bootstrap <path-to-this-file> ...
*
*/
// Some PHP settings:
date_default_timezone_set('UTC');
error_reporting(E_ALL | E_STRICT);
// If xdebug is loaded, disable xdebug backtraces:
extension_loaded('xdebug') && xdebug_disable();
require_once('vendor/autoload.php');
$namespaces = array();
$nsbase = __DIR__;
$loader = new \Composer\Autoload\ClassLoader();
$loader->add('Nethgui', $nsbase);
$loader->add('NethServer', $nsbase);
$loader->register();
foreach ($loader->getPrefixes() as $nsName => $paths) {
$namespaces[trim($nsName, '\\')] = reset($paths) . DIRECTORY_SEPARATOR . trim($nsName, '\\');
}
$loader->add('Pimple', $nsbase);
$loader->add('Mustache', $nsbase);
$loader->add('Symfony', $nsbase);
$FW = new \Nethgui\Framework();
$FW
->setLogLevel(E_WARNING | E_ERROR | E_NOTICE)
->setSiteUrl('http://localhost:8080')
;
$FW=NULL;