From 2865efcd08c4b23121078833903fc12efc23b599 Mon Sep 17 00:00:00 2001 From: meus Date: Sat, 21 Jul 2007 16:32:17 +0000 Subject: [PATCH] Adding modified testcase from #403 --- tests/Relation/ManyToMany2TestCase.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Relation/ManyToMany2TestCase.php b/tests/Relation/ManyToMany2TestCase.php index 85a88c80c..b53514b0c 100644 --- a/tests/Relation/ManyToMany2TestCase.php +++ b/tests/Relation/ManyToMany2TestCase.php @@ -37,6 +37,21 @@ class Doctrine_Relation_ManyToMany2_TestCase extends Doctrine_UnitTestCase { } } + public function testManyToManyJoinsandSave() { + $q = new Doctrine_Query(); + $newdata = $q->select('d.*, i.*, u.*, c.*') + ->from('TestMovie d, d.MovieBookmarks i, i.UserVotes u, u.User c') + ->execute() + ->getFirst(); + $newdata['MovieBookmarks'][0]['UserVotes'][0]['User']['name'] = 'user2'; + try { + $newdata->save(); + $this->pass(); + } catch(Doctrine_Exception $e) { + print $e; + $this->fail(); + } + } } class TestUser extends Doctrine_Record