AbstractLazyCollectionTest.php in Plug 7
File
lib/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php
View source
<?php
namespace Doctrine\Tests\Common\Collections;
use Doctrine\Tests\LazyArrayCollection;
class AbstractLazyCollectionTest extends \PHPUnit_Framework_TestCase {
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);
}
}