mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Don't use chdir(), it confuses the hell out of phpunit (e.g. directory_exists() and realpath() no longer work as expected) (from r111051)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112889 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ea2b86cd1d
commit
b93fe403c0
@ -6,8 +6,6 @@
|
||||
$_SERVER['SCRIPT_FILENAME'] = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'cli-script.php';
|
||||
$_SERVER['SCRIPT_NAME'] = '.' . DIRECTORY_SEPARATOR . 'sapphire' . DIRECTORY_SEPARATOR . 'cli-script.php';
|
||||
|
||||
// Change to
|
||||
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
|
||||
define('BASE_PATH', rtrim(dirname(dirname(dirname(__FILE__)))), DIRECTORY_SEPARATOR);
|
||||
|
||||
// Copied from cli-script.php, to enable same behaviour through phpunit runner.
|
||||
@ -27,7 +25,7 @@ if(isset($_SERVER['argv'][2])) {
|
||||
}
|
||||
|
||||
if(!class_exists('Object')) {
|
||||
require_once("core/Core.php");
|
||||
require_once("sapphire/core/Core.php");
|
||||
global $databaseConfig;
|
||||
DB::connect($databaseConfig);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user