setHttpCode() 공개 메소드

Set the HTTP code
public setHttpCode ( integer $code ) : Error
$code integer The code to set
리턴 Error
예제 #1
0
파일: ErrorTest.php 프로젝트: imbo/imbo
 /**
  * @covers Imbo\Model\Error::getData
  */
 public function testGetData()
 {
     $date = new DateTime();
     $this->model->setHttpCode(404);
     $this->model->setErrorMessage('message');
     $this->model->setDate($date);
     $this->model->setImboErrorCode(100);
     $this->model->setImageIdentifier('identifier');
     $this->assertSame(['httpCode' => 404, 'errorMessage' => 'message', 'date' => $date, 'imboErrorCode' => 100, 'imageIdentifier' => 'identifier'], $this->model->getData());
 }
예제 #2
0
파일: ErrorTest.php 프로젝트: ASP96/imbo
 /**
  * @covers Imbo\Model\Error::getHttpCode
  * @covers Imbo\Model\Error::setHttpCode
  */
 public function testCanSetAndGetHttpCode()
 {
     $this->assertNull($this->model->getHttpCode());
     $this->assertSame($this->model, $this->model->setHttpCode(404));
     $this->assertSame(404, $this->model->getHttpCode());
 }