public function ConstraintViolationListTest::testArrayAccess in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/validator/Tests/ConstraintViolationListTest.php \Symfony\Component\Validator\Tests\ConstraintViolationListTest::testArrayAccess()
File
- vendor/
symfony/ validator/ Tests/ ConstraintViolationListTest.php, line 85
Class
Namespace
Symfony\Component\Validator\TestsCode
public function testArrayAccess() {
$violation = $this
->getViolation('Error');
$this->list[] = $violation;
$this
->assertSame($violation, $this->list[0]);
$this
->assertTrue(isset($this->list[0]));
unset($this->list[0]);
$this
->assertFalse(isset($this->list[0]));
$this->list[10] = $violation;
$this
->assertSame($violation, $this->list[10]);
$this
->assertTrue(isset($this->list[10]));
}