You are here

public function AbstractLazyCollectionTest::testLazyCollection in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php \Doctrine\Tests\Common\Collections\AbstractLazyCollectionTest::testLazyCollection()

File

vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php, line 9

Class

AbstractLazyCollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

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);
}