Ejemplo n.º 1
0
 /**
  * Run PHPUnit with the temporary XML configuration.
  *
  * @return void
  */
 protected function test()
 {
     // We'll simply fire off PHPUnit with the configuration switch
     // pointing to our requested configuration file. This allows
     // us to flexibly run tests for any setup.
     $path = 'phpunit.xml';
     // fix the spaced directories problem when using the command line
     // strings with spaces inside should be wrapped in quotes.
     $esc_path = escapeshellarg($path);
     passthru('LARAVEL_ENV=' . Request::env() . ' phpunit --configuration ' . $esc_path, $status);
     @unlink($path);
     // Pass through the exit status
     exit($status);
 }
Ejemplo n.º 2
0
 /**
  * Get the array of configuration paths that should be searched for a bundle.
  *
  * @param  string  $bundle
  * @return array
  */
 protected static function paths($bundle)
 {
     $paths[] = Bundle::path($bundle) . 'config/';
     // Configuration files can be made specific for a given environment. If an
     // environment has been set, we will merge the environment configuration
     // in last, so that it overrides all other options.
     if (!is_null(Request::env())) {
         $paths[] = $paths[count($paths) - 1] . Request::env() . '/';
     }
     return $paths;
 }
Ejemplo n.º 3
0
 protected static function paths($bundle)
 {
     $paths[] = Bundle::path($bundle) . 'config/';
     if (!is_null(Request::env())) {
         $paths[] = $paths[count($paths) - 1] . Request::env() . '/';
     }
     return $paths;
 }