/** * @covers UserError::__toString */ public function test__toString() { $msg = "This field is requires"; $this->object->setMessage($msg); $this->assertEquals($msg, $this->object->__toString()); }
public function addErrorMessage($msg) { $error = new UserError(); $error->setMessage($msg); $this->errors[] = $error; }