Example #1
0
 protected function makeApp($env)
 {
     $app = new App();
     $app['path'] = dirname(__DIR__) . '/mockApp';
     $app['env'] = $env;
     $app->bindIf('config.loader', function ($app) {
         return new FileLoader(new Filesystem(), $app['path'] . '/config');
     }, true);
     $app->instance('config', new Config($app['config.loader'], $app['env']));
     return $app;
 }
Example #2
0
 /**
  * Register a binding if it hasn't already been registered.
  *
  * @param string $abstract
  * @param \Closure|string|null $concrete
  * @param bool $shared
  * @return void 
  * @static 
  */
 public static function bindIf($abstract, $concrete = null, $shared = false)
 {
     //Method inherited from \Illuminate\Container\Container
     \Illuminate\Foundation\Application::bindIf($abstract, $concrete, $shared);
 }