public function ConstraintViolationListTest::testAddAll in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/ConstraintViolationListTest.php \Symfony\Component\Validator\Tests\ConstraintViolationListTest::testAddAll()
File
- vendor/
symfony/ 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]);
}