X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=vendor%2Fdoctrine%2Form%2Ftests%2FDoctrine%2FTests%2FORM%2FPersistentCollectionTest.php;fp=vendor%2Fdoctrine%2Form%2Ftests%2FDoctrine%2FTests%2FORM%2FPersistentCollectionTest.php;h=fd0dffbf29032f94d9ad4be4484a18455fc66d83;hb=8b04b2d11798dee4f3e1358e4f43e97a6df851f6;hp=0000000000000000000000000000000000000000;hpb=73568cf05a785a45f94ca3f2351d9e07bf917958;p=zf2.biz%2Fapplication_blanche.git diff --git a/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php new file mode 100644 index 0000000..fd0dffb --- /dev/null +++ b/vendor/doctrine/orm/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php @@ -0,0 +1,37 @@ + + */ +class PersistentCollectionTest extends \Doctrine\Tests\OrmTestCase +{ + private $_connectionMock; + private $_emMock; + + protected function setUp() + { + parent::setUp(); + // SUT + $this->_connectionMock = new ConnectionMock(array(), new \Doctrine\Tests\Mocks\DriverMock()); + $this->_emMock = EntityManagerMock::create($this->_connectionMock); + } + + public function testCanBePutInLazyLoadingMode() + { + $class = $this->_emMock->getClassMetadata('Doctrine\Tests\Models\ECommerce\ECommerceProduct'); + $collection = new PersistentCollection($this->_emMock, $class, new ArrayCollection); + $collection->setInitialized(false); + $this->assertFalse($collection->isInitialized()); + } +}