1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-01 00:14:58 +02:00
php-e107/tests/_bootstrap.php
Nick Liu 9e0d603609
100% test coverage for \e107\Shims
New test forces a failover of the `readfile()` internal function to
test the failover functionality of \e107\Shims\Internal::readfile()
2018-11-03 09:11:42 -05:00

19 lines
597 B
PHP

<?php
Codeception\Util\Autoload::addNamespace('', codecept_root_dir().'/tests/unit');
define('PARAMS_GENERATOR', realpath(codecept_root_dir()."/lib/config.php"));
$params = include(PARAMS_GENERATOR);
$app_path = $params['app_path'] ?: codecept_root_dir()."/e107";
// Relative path
if (substr($app_path, 0, 1) !== '/')
$app_path = codecept_root_dir() . "/${app_path}";
define('APP_PATH', realpath($app_path));
define('PARAMS_SERIALIZED', serialize($params));
// Provide a way to register callbacks that execute before Codeception's
include(codecept_root_dir()."/lib/PriorityCallbacks.php");