Change inner workings of test runner to use different bootstrap file when testing the core.
This commit is contained in:
32
laravel/tests/phpunit.php
Normal file
32
laravel/tests/phpunit.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Define the directory separator for the environment.
|
||||
// --------------------------------------------------------------
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Set the core Laravel path constants.
|
||||
// --------------------------------------------------------------
|
||||
require 'paths.php';
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Override the application paths when testing the core.
|
||||
// --------------------------------------------------------------
|
||||
$path = path('sys').'tests'.DS;
|
||||
|
||||
set_path('app', $path.'application'.DS);
|
||||
|
||||
set_path('bundle', $path.'bundles'.DS);
|
||||
|
||||
set_path('storage', $path.'storage'.DS);
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Bootstrap the Laravel core.
|
||||
// --------------------------------------------------------------
|
||||
require path('sys').'core.php';
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Start the default bundle.
|
||||
// --------------------------------------------------------------
|
||||
Laravel\Bundle::start(DEFAULT_BUNDLE);
|
||||
Reference in New Issue
Block a user