public function AbstractLazyCollectionTest::testLazyCollection in Plug 7
File
- lib/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ AbstractLazyCollectionTest.php, line 9
Class
Namespace
Doctrine\Tests\Common\CollectionsCode
public function testLazyCollection() {
$collection = new LazyArrayCollection();
$this
->assertFalse($collection
->isInitialized());
$this
->assertCount(3, $collection);
$collection
->add('bar');
$this
->assertTrue($collection
->isInitialized());
$this
->assertCount(4, $collection);
}