Example #1
0
 public function testBasicRoutingIntegration()
 {
     $app = new Application();
     $app['router']->get('/foo', function () {
         return 'bar';
     });
     $app['request'] = Request::create('/foo');
     $response = $app->dispatch($app['request']);
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
     $this->assertEquals('bar', $response->getContent());
 }
Example #2
0
 /**
  * Handle the given request and get the response.
  *
  * @param \Illuminate\Http\Request $request
  * @return \Symfony\Component\HttpFoundation\Response 
  * @static 
  */
 public static function dispatch($request)
 {
     return \Illuminate\Foundation\Application::dispatch($request);
 }