Imbo\Http\Response\Response::setNotModified PHP Method

setNotModified() public method

Marks the response as not modified as per the Symfony
public setNotModified ( )
    public function setNotModified()
    {
        parent::setNotModified();
        $this->setModel(null);
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @covers Imbo\Http\Response\Response::setModel
  * @covers Imbo\Http\Response\Response::setNotModified
  */
 public function testRemovesModelWhenMarkedAsNotModified()
 {
     $model = $this->getMock('Imbo\\Model\\ModelInterface');
     $this->assertSame($this->response, $this->response->setModel($model));
     $this->assertSame($this->response, $this->response->setNotModified());
     $this->assertSame(304, $this->response->getStatusCode());
     $this->assertNull($this->response->getModel());
 }