예제 #1
0
 function testOptionsHeaderWithCustomOptionsRoute()
 {
     $app = new Bullet\App();
     $req = new Bullet\Request('OPTIONS', '/test');
     $app->path('test', function ($request) use($app) {
         $app->get(function ($request) {
             return 'GET';
         });
         $app->post(function ($request) {
             return 'POST';
         });
         $app->options(function ($request) {
             return 'OPTIONS';
         });
     });
     $res = $app->run($req);
     $this->assertEquals('OPTIONS', $res->content());
     $this->assertEquals(false, $res->header('Allow'));
 }