#1245 DDC-2504 - splitting test method into a test about count()
and one about contains()
on a lazy persistent collection
This commit is contained in:
parent
8d287b17d7
commit
7a0cb1c370
1 changed files with 10 additions and 1 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue