From 2c508102c4afea6b027e6738869e641feffda60b Mon Sep 17 00:00:00 2001 From: piccoloprincipe Date: Thu, 2 Jul 2009 07:47:57 +0000 Subject: [PATCH] [2.0] addresses #2307 --- .../Functional/OneToManyBidirectionalAssociationTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php b/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php index bf7ce5f97..7018bb4eb 100644 --- a/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/OneToManyBidirectionalAssociationTest.php @@ -37,6 +37,13 @@ class OneToManyBidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona $this->assertFeatureForeignKeyIs($this->product->getId(), $this->secondFeature); } + public function testSavesAnEmptyCollection() + { + $this->_em->save($this->product); + + $this->assertEquals(0, count($this->product->getFeatures())); + } + public function testDoesNotSaveAnInverseSideSet() { $this->product->brokenAddFeature($this->firstFeature); $this->_em->save($this->product);