You are here

class AbstractLazyCollectionTest in Plug 7

Hierarchy

  • class \Doctrine\Tests\Common\Collections\AbstractLazyCollectionTest extends \Doctrine\Tests\Common\Collections\PHPUnit_Framework_TestCase

Expanded class hierarchy of AbstractLazyCollectionTest

File

lib/doctrine/collections/tests/Doctrine/Tests/Common/Collections/AbstractLazyCollectionTest.php, line 7

Namespace

Doctrine\Tests\Common\Collections
View source
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);
  }

}

Members