Beispiel #1
0
 /**
  * Tests modError.hasError, ensuring it correctly calculates when an error is added
  * @depends testAddError
  * @depends testReset
  */
 public function testHasError()
 {
     $this->error->addError('A test error');
     $this->assertTrue($this->error->hasError());
     $this->error->reset();
     $this->error->addField('name', 'A name is required.');
     $this->assertTrue($this->error->hasError());
 }
 /**
  * Check if there is any error.
  * 
  * @access public
  * @return boolean Indicates if there is error.
  */
 public function hasError()
 {
     return $this->error !== null && $this->error instanceof modError && $this->error->hasError();
 }