diff --git a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php index 5b5f1bd51..90479ca39 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php @@ -369,9 +369,18 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertFalse($otherClass->childClasses->contains($childClass)); $this->assertEquals($queryCount, $this->getCurrentQueryCount(), "Checking for contains of managed entity (but not persisted) should cause no query to be executed."); $this->assertFalse($otherClass->childClasses->isInitialized(), "Post-Condition: Collection is not initialized."); + } + + /** + * @group DDC-2504 + */ + public function testCountingOnOneToManyJoinedInheritanceWillNotInitializeCollection() + { + $otherClass = $this->_em->find('Doctrine\Tests\Models\DDC2504\DDC2504OtherClass', $this->ddc2504OtherClassId); - $this->assertFalse($otherClass->childClasses->isInitialized(), "Pre-Condition"); $this->assertEquals(2, count($otherClass->childClasses)); + + $this->assertFalse($otherClass->childClasses->isInitialized()); } /**