public function ConstraintViolationListTest::testArrayAccess in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ 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]));
}