From fac410b213e941736f0fb952bdf1e63b83085114 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 29 Jan 2015 18:39:30 +0000 Subject: [PATCH] #1169 DDC-3343 - aligning test suite logic to the 2.5 branch (failing tests) --- tests/Doctrine/Tests/Models/Tweet/Tweet.php | 13 ++++++++----- .../ORM/Functional/ExtraLazyCollectionTest.php | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/Doctrine/Tests/Models/Tweet/Tweet.php b/tests/Doctrine/Tests/Models/Tweet/Tweet.php index 8a315df9e..14411dc2a 100644 --- a/tests/Doctrine/Tests/Models/Tweet/Tweet.php +++ b/tests/Doctrine/Tests/Models/Tweet/Tweet.php @@ -18,17 +18,20 @@ class Tweet public $id; /** - * @Column(type="string") + * @Column(type="string", length=140) */ - public $content; + public $content = ''; /** - * @ManyToOne(targetEntity="User", inversedBy="tweets") + * @ManyToOne(targetEntity="User", inversedBy="tweets", cascade={"persist"}, fetch="EXTRA_LAZY") */ public $author; - public function setAuthor(User $user) + /** + * @param User $author + */ + public function setAuthor(User $author) { - $this->author = $user; + $this->user = $author; } } diff --git a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php index 6633f0c24..2c6fd6faf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.php @@ -28,6 +28,7 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase { $this->useModelSet('tweet'); $this->useModelSet('cms'); + $this->useModelSet('tweet'); parent::setUp(); $class = $this->_em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');