1
0
mirror of synced 2025-02-02 13:31:45 +03:00

Add test for removing element not in collection

This commit is contained in:
Andreas Braun 2017-07-13 16:39:06 +02:00 committed by Marco Pivetta
parent 7c1ebd99bc
commit 095b365146
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -641,6 +641,8 @@ class ExtraLazyCollectionTest extends OrmFunctionalTestCase
$this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Removing a persisted entity should cause one query to be executed.");
$this->assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized.");
$this->assertFalse($user->groups->removeElement($group), "Removing an already removed element returns false");
// Test Many to Many removal with Entity state as new
$group = new \Doctrine\Tests\Models\CMS\CmsGroup();
$group->name = "A New group!";