Ergo\Http\ResponseBuilder::notFound PHP Method

notFound() public method

Configures response as a '404 Not Found'
public notFound ( )
    public function notFound()
    {
        return $this->setStatusCode(404);
    }

Usage Example

Example #1
0
 public function testNotFound()
 {
     $builder = new Http\ResponseBuilder();
     $response = $builder->notFound()->build();
     $this->assertEquals($response->getStatus()->getCode(), 404);
     $this->assertFalse($response->hasBody());
 }