phpunit.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Laravel - A PHP Framework For Web Artisans
  4. *
  5. * @package Laravel
  6. * @version 3.0.0
  7. * @author Taylor Otwell <taylorotwell@gmail.com>
  8. * @link http://laravel.com
  9. */
  10. // --------------------------------------------------------------
  11. // Define the directory separator for the environment.
  12. // --------------------------------------------------------------
  13. define('DS', DIRECTORY_SEPARATOR);
  14. // --------------------------------------------------------------
  15. // Set the core Laravel path constants.
  16. // --------------------------------------------------------------
  17. require 'paths.php';
  18. // --------------------------------------------------------------
  19. // Override the application paths when testing the core.
  20. // --------------------------------------------------------------
  21. $config = file_get_contents('phpunit.xml');
  22. if (strpos($config, 'laravel-tests') !== false)
  23. {
  24. $path = path('bundle').'laravel-tests'.DS;
  25. set_path('app', $path.'application'.DS);
  26. set_path('bundle', $path.'bundles'.DS);
  27. set_path('storage', $path.'storage'.DS);
  28. }
  29. // --------------------------------------------------------------
  30. // Bootstrap the Laravel core.
  31. // --------------------------------------------------------------
  32. require path('sys').'core.php';
  33. // --------------------------------------------------------------
  34. // Start the default bundle.
  35. // --------------------------------------------------------------
  36. Bundle::start(DEFAULT_BUNDLE);