silverstripe-cms/tests/bootstrap/init.php
Sam Minnee bf9939e32c NEW: Refactor test bootstrap to be more modular.
The test bootstrap is broken into units that can be combined for
different test situations:

 - phpunit
 - behat
 - serve
2016-10-28 17:47:53 +13:00

13 lines
391 B
PHP

<?php
if(!defined('FRAMEWORK_PATH')) {
echo "FRAMEWORK_PATH hasn't been defined. This probably means that framework/Core/Constants.php hasn't been " .
"included by Composer's autoloader.\n" .
"Make sure the you are running your tests via vendor/bin/phpunit and your autoloader is up to date.\n";
exit(1);
}
if (empty($_SERVER['HTTP_HOST'])) {
$_SERVER['HTTP_HOST'] = 'localhost';
}