PHPUnit tests improvements.

This commit is contained in:
Dmitry Khomutov 2018-02-28 20:53:21 +07:00
commit 4cb041e8fb
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
6 changed files with 171 additions and 77 deletions

View file

@ -1,27 +1,27 @@
<?php
if (!defined('ROOT_DIR')) {
define('ROOT_DIR', __DIR__ . DIRECTORY_SEPARATOR);
define('ROOT_DIR', __DIR__ . '/');
}
if (!defined('SRC_DIR')) {
define('SRC_DIR', ROOT_DIR . 'src' . DIRECTORY_SEPARATOR . 'PHPCensor' . DIRECTORY_SEPARATOR);
define('SRC_DIR', ROOT_DIR . 'src/PHPCensor/');
}
if (!defined('PUBLIC_DIR')) {
define('PUBLIC_DIR', ROOT_DIR . 'public' . DIRECTORY_SEPARATOR);
define('PUBLIC_DIR', ROOT_DIR . 'public/');
}
if (!defined('APP_DIR')) {
define('APP_DIR', ROOT_DIR . 'app' . DIRECTORY_SEPARATOR);
define('APP_DIR', ROOT_DIR . 'app/');
}
if (!defined('BIN_DIR')) {
define('BIN_DIR', ROOT_DIR . 'bin' . DIRECTORY_SEPARATOR);
define('BIN_DIR', ROOT_DIR . 'bin/');
}
if (!defined('RUNTIME_DIR')) {
define('RUNTIME_DIR', ROOT_DIR . 'runtime' . DIRECTORY_SEPARATOR);
define('RUNTIME_DIR', ROOT_DIR . 'runtime/');
}
require_once(ROOT_DIR . 'vendor/autoload.php');
@ -30,7 +30,7 @@ require_once(ROOT_DIR . 'vendor/autoload.php');
$conf = [];
$conf['b8']['app']['namespace'] = 'PHPCensor';
$conf['b8']['app']['default_controller'] = 'Home';
$conf['b8']['view']['path'] = SRC_DIR . 'View' . DIRECTORY_SEPARATOR;
$conf['b8']['view']['path'] = SRC_DIR . 'View/';
$config = new b8\Config($conf);