コード例 #1
0
ファイル: ApplicationTest.php プロジェクト: Frenkz/Proton
 public function testTerminate()
 {
     $app = new Application();
     $app->subscribe('response.sent', function ($event, $request, $response) {
         $this->assertInstanceOf('League\\Event\\Event', $event);
         $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Request', $request);
         $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
     });
     $request = Request::createFromGlobals();
     $response = $app->handle($request);
     $app->terminate($request, $response);
 }