Permalink
Browse files

MINOR Don't use chdir(), it confuses the hell out of phpunit (e.g. di…

…rectory_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
  • Loading branch information...
1 parent ea2b86c commit b93fe403c0a7be14bee8dfb4fac1b1545f768ed4 @sminnee sminnee committed Oct 19, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 tests/bootstrap.php
View
@@ -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(!class_exists('Object')) {
- require_once("core/Core.php");
+ require_once("sapphire/core/Core.php");
global $databaseConfig;
DB::connect($databaseConfig);
}

0 comments on commit b93fe40

Please sign in to comment.