Ergo\Http\ResponseBuilder::methodNotAllowed PHP 메소드

methodNotAllowed() 공개 메소드

Configures response as a '405 Method Not Allowed'
public methodNotAllowed ( )
    public function methodNotAllowed()
    {
        return $this->setStatusCode(405);
    }

Usage Example

예제 #1
0
 public function testMethodNotAllowed()
 {
     $builder = new Http\ResponseBuilder();
     $response = $builder->methodNotAllowed()->build();
     $this->assertEquals($response->getStatus()->getCode(), 405);
     $this->assertFalse($response->hasBody());
 }