public function testSetErrors() { $errors = array(); $this->element->setErrors($errors); $this->assertEquals($errors, $this->element->errors()); $errors[] = 'Test'; $this->element->setErrors($errors); $this->assertEquals($errors, $this->element->errors()); $this->element->addError('Test 2'); $errors[] = 'Test 2'; $this->assertEquals($errors, $this->element->errors()); }