Exemplo n.º 1
0
 /**
  * Get the registered component.
  *
  * @return string
  */
 protected static function getFacadeAccessor()
 {
     if (!static::$app) {
         static::$app = FormerServiceProvider::make();
     }
     return 'former';
 }
Exemplo n.º 2
0
 /**
  * Build the IoC Container for the tests
  */
 public function setUp()
 {
     if (!static::$appCache) {
         $this->app = FormerServiceProvider::make();
         // Setup Illuminate
         $this->mockSession();
         $this->mockTranslator();
         $this->mockUrl();
         $this->mockValidator();
         static::$appCache = $this->app;
     }
     $this->app = static::$appCache;
     $this->mockConfig();
     $this->mockRequest();
 }
Exemplo n.º 3
0
 /**
  * Static alias for binding classes to a given Container
  *
  * @param Container $app
  *
  * @return Container
  */
 public static function make(Container $app = null)
 {
     // If no Container, create one
     if (!$app) {
         $app = new Container();
     }
     // Call the class binders
     $serviceProvider = new static($app);
     $app = FormerServiceProvider::make($app);
     $app = $serviceProvider->bindCoreClasses($app);
     $app = $serviceProvider->bindWarkhamClasses($app);
     // Set framework
     $app['former']->framework('TwitterBootstrap3');
     return $app;
 }