예제 #1
0
 public function testErrorHandler()
 {
     $app = new App(__DIR__);
     $app->errorHandler(function (Request $req, Response $res) {
         return $res->text('ERROR');
     });
     $app->execute($req = new Request(), $res = new Response($req));
     $this->assertEquals('ERROR', $res->body());
 }