fix testing of the core.
This commit is contained in:
parent
f44c565ee4
commit
a351e91aef
|
@ -35,16 +35,6 @@ public function core()
|
|||
|
||||
$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();
|
||||
}
|
||||
|
||||
|
|
16
phpunit.php
16
phpunit.php
|
@ -18,6 +18,22 @@
|
|||
// --------------------------------------------------------------
|
||||
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.
|
||||
// --------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue