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');