public function CollectionTest::testArrayAccess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php \Doctrine\Tests\Common\Collections\CollectionTest::testArrayAccess()
File
- vendor/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ CollectionTest.php, line 77
Class
Namespace
Doctrine\Tests\Common\CollectionsCode
public function testArrayAccess() {
$this->collection[] = 'one';
$this->collection[] = 'two';
$this
->assertEquals($this->collection[0], 'one');
$this
->assertEquals($this->collection[1], 'two');
unset($this->collection[0]);
$this
->assertEquals($this->collection
->count(), 1);
}