예제 #1
0
 public function test_to_array_multiple()
 {
     $result = new ValidationResult();
     $result->addErrors([new ValidationError('foo', '', new StringConstraint()), new ValidationError('foo', '', new IntegerConstraint())]);
     $this->assertEquals(['foo' => [(new StringConstraint())->getMessage(), (new IntegerConstraint())->getMessage()]], $result->toArray());
 }