phpunit.php 1.42 KB
Newer Older
1
<?php
Taylor Otwell committed
2 3 4 5
/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
Taylor Otwell committed
6
 * @version  3.0.0
Taylor Otwell committed
7 8 9
 * @author   Taylor Otwell <taylorotwell@gmail.com>
 * @link     http://laravel.com
 */
10 11

// --------------------------------------------------------------
12 13 14 15 16
// Define the directory separator for the environment.
// --------------------------------------------------------------
define('DS', DIRECTORY_SEPARATOR);

// --------------------------------------------------------------
17 18 19 20 21
// Set the core Laravel path constants.
// --------------------------------------------------------------
require 'paths.php';

// --------------------------------------------------------------
Taylor Otwell committed
22 23 24 25 26 27
// Override the application paths when testing the core.
// --------------------------------------------------------------
$config = file_get_contents('phpunit.xml');

if (strpos($config, 'laravel-tests') !== false)
{
Taylor Otwell committed
28
	$path = path('bundle').'laravel-tests'.DS;
Taylor Otwell committed
29

Taylor Otwell committed
30
	set_path('app', $path.'application'.DS);
Taylor Otwell committed
31

Taylor Otwell committed
32
	set_path('bundle', $path.'bundles'.DS);
Taylor Otwell committed
33

Taylor Otwell committed
34
	set_path('storage', $path.'storage'.DS);
Taylor Otwell committed
35 36 37
}

// --------------------------------------------------------------
38 39
// Bootstrap the Laravel core.
// --------------------------------------------------------------
Taylor Otwell committed
40
require path('sys').'core.php';
41 42 43 44

// --------------------------------------------------------------
// Start the default bundle.
// --------------------------------------------------------------
45
Laravel\Bundle::start(DEFAULT_BUNDLE);