public function ConstraintViolationListTest::testAddAll in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ ConstraintViolationListTest.php, line 54
Class
Namespace
Symfony\Component\Validator\TestsCode
public function testAddAll() {
$violations = array(
10 => $this
->getViolation('Error 1'),
20 => $this
->getViolation('Error 2'),
30 => $this
->getViolation('Error 3'),
);
$otherList = new ConstraintViolationList($violations);
$this->list
->addAll($otherList);
$this
->assertCount(3, $this->list);
$this
->assertSame($violations[10], $this->list[0]);
$this
->assertSame($violations[20], $this->list[1]);
$this
->assertSame($violations[30], $this->list[2]);
}