Commit a351e91a authored by Taylor Otwell's avatar Taylor Otwell

fix testing of the core.

parent f44c565e
......@@ -35,16 +35,6 @@ class Runner extends Task {
$path = $GLOBALS['BUNDLE_PATH'].'laravel-tests/';
// When testing the framework, we will swap out the application
// and other core paths to stub out the application portion of
// the framework for testing. This allows us to create dummy
// controllers, views, models, etc.
$GLOBALS['APP_PATH'] = $path.'application'.DS;
$GLOBALS['BUNDLE_PATH'] = $path.'bundles'.DS;
$GLOBALS['STORAGE_PATH'] = $path.'storage'.DS;
$this->test();
}
......
......@@ -18,6 +18,22 @@ define('DS', DIRECTORY_SEPARATOR);
// --------------------------------------------------------------
require 'paths.php';
// --------------------------------------------------------------
// Override the application paths when testing the core.
// --------------------------------------------------------------
$config = file_get_contents('phpunit.xml');
if (strpos($config, 'laravel-tests') !== false)
{
$path = $GLOBALS['BUNDLE_PATH'].'laravel-tests'.DS;
$GLOBALS['APP_PATH'] = $path.'application'.DS;
$GLOBALS['BUNDLE_PATH'] = $path.'bundles'.DS;
$GLOBALS['STORAGE_PATH'] = $path.'storage'.DS;
}
// --------------------------------------------------------------
// Bootstrap the Laravel core.
// --------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment