diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php new file mode 100644 index 000000000..5538ee3d4 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2074Test.php @@ -0,0 +1,29 @@ +_em->getClassMetadata('Doctrine\Tests\Models\ECommerce\ECommerceProduct'); + $product = new ECommerceProduct(); + $category = new ECommerceCategory(); + $collection = new PersistentCollection($this->_em, $class, new ArrayCollection(array($category))); + $collection->setOwner($product, $class->associationMappings['categories']); + + $uow = $this->_em->getUnitOfWork(); + $clonedCollection = clone $collection; + $clonedCollection->clear(); + + $this->assertEquals(0, count($uow->getScheduledCollectionDeletions())); + } +} \ No newline at end of file