/** * Return an array of all the errors added for this field * * @return null */ public function testGetErrors() { $expected = array($this->firstMsg); $this->assertEquals($expected, $this->error->getErrors()); $msg2 = 'second error message'; $msg3 = 'third error message'; $msg4 = 'fourth error message'; $this->error->add($msg2)->add($msg3)->add($msg4); $expected = array($this->firstMsg, $msg2, $msg3, $msg4); $this->assertEquals($expected, $this->error->getErrors()); }