setImboErrorCode() public method

Set the imbo error code
public setImboErrorCode ( integer $code ) : Error
$code integer The code to set
return Error
Beispiel #1
0
 /**
  * @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());
 }
Beispiel #2
0
 /**
  * @covers Imbo\Model\Error::getImboErrorCode
  * @covers Imbo\Model\Error::setImboErrorCode
  */
 public function testCanSetAndGetImboErrorCode()
 {
     $this->assertNull($this->model->getImboErrorCode());
     $this->assertSame($this->model, $this->model->setImboErrorCode(100));
     $this->assertSame(100, $this->model->getImboErrorCode());
 }