php-censor/tests/bootstrap.php

39 lines
780 B
PHP
Raw Normal View History

<?php
2016-05-19 17:25:43 +02:00
if (!defined('ROOT_DIR')) {
2018-02-28 14:53:21 +01:00
define('ROOT_DIR', dirname(__DIR__) . '/');
2016-05-19 17:25:43 +02:00
}
2016-07-21 17:20:34 +02:00
if (!defined('SRC_DIR')) {
2018-03-04 12:04:15 +01:00
define('SRC_DIR', ROOT_DIR . 'src/');
2016-05-19 17:25:43 +02:00
}
2016-07-21 17:20:34 +02:00
if (!defined('PUBLIC_DIR')) {
2018-02-28 14:53:21 +01:00
define('PUBLIC_DIR', ROOT_DIR . 'public/');
2016-05-19 17:25:43 +02:00
}
2016-07-21 17:20:34 +02:00
if (!defined('APP_DIR')) {
2018-02-28 14:53:21 +01:00
define('APP_DIR', ROOT_DIR . 'app/');
2016-05-19 17:25:43 +02:00
}
2016-07-21 17:20:34 +02:00
if (!defined('BIN_DIR')) {
2018-02-28 14:53:21 +01:00
define('BIN_DIR', ROOT_DIR . 'bin/');
2016-05-19 17:25:43 +02:00
}
2016-07-21 17:20:34 +02:00
if (!defined('RUNTIME_DIR')) {
2018-02-28 14:53:21 +01:00
define('RUNTIME_DIR', ROOT_DIR . 'runtime/');
2016-05-19 17:25:43 +02:00
}
2014-12-08 16:09:57 +01:00
2016-05-19 17:25:43 +02:00
require_once(ROOT_DIR . 'vendor/autoload.php');
$conf = [];
$conf['php-censor']['url'] = 'http://php-censor.local';
2014-12-25 22:20:11 +01:00
2018-03-04 09:56:02 +01:00
$config = new PHPCensor\Config($conf);
if (!defined('APP_URL')) {
2016-07-21 19:02:11 +02:00
define('APP_URL', $config->get('php-censor.url', '') . '/');
2016-05-19 17:25:43 +02:00
}
2018-02-28 14:53:21 +01:00
\PHPCensor\Helper\Lang::init($config);