Example #1
0
 /**
  * @return Response
  */
 public function boot()
 {
     // Get system is booting, load routes
     $routes = $this->loadRoutes();
     $kernel = new Kernel($this->getContainer(), new Router($routes));
     $this->container->add('request', function () {
         return Request::create();
     });
     $response = $kernel->handle($this->container->make('request'));
     foreach ($this->services as $service) {
         if (method_exists($service, 'bootstrap')) {
             $service->bootstrap();
         }
     }
     return $response;
 }
Example #2
0
 public function testResolvesQueryString()
 {
     $request = Request::create('/foo?bar=baz');
     $this->assertEquals('/foo', $request->getUri()->getPath());
     $this->assertEquals('/foo?bar=baz', $request->getUri());
 }