コード例 #1
0
 /**
  * Test logic to prevent adding an identical error more than once.
  * The error has to have the same error code for the same row number
  */
 public function testAddTheSameErrorTwice()
 {
     $this->model->addError('systemException', 'not-critical', 1);
     $this->model->addError('systemException', 'not-critical', 1);
     $result = $this->model->getErrorByRowNumber(1);
     $this->assertCount(1, $result);
     $this->assertEquals(1, $this->model->getErrorsCount());
 }