setModel() public method

Set the model instance
public setModel ( Imbo\Model\ModelInterface $model = null ) : Response
$model Imbo\Model\ModelInterface A model instance
return Response
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());
 }