示例#1
0
 public function testSetErrors()
 {
     $result = new \r8\Validator\ErrorList();
     $result->addError("This is an error message");
     $this->assertEquals(array("This is an error message"), $result->getErrors());
     $this->assertSame($result, $result->setError("This is a new error"));
     $this->assertEquals(array("This is a new error"), $result->getErrors());
 }