You are here

public function ConstraintViolationListTest::testAdd in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/ConstraintViolationListTest.php \Symfony\Component\Validator\Tests\ConstraintViolationListTest::testAdd()

File

vendor/symfony/validator/Tests/ConstraintViolationListTest.php, line 45

Class

ConstraintViolationListTest

Namespace

Symfony\Component\Validator\Tests

Code

public function testAdd() {
  $violation = $this
    ->getViolation('Error');
  $this->list
    ->add($violation);
  $this
    ->assertCount(1, $this->list);
  $this
    ->assertSame($violation, $this->list[0]);
}