diff --git a/tests/Doctrine/Tests/Models/CMS/CmsArticle.php b/tests/Doctrine/Tests/Models/CMS/CmsArticle.php index 2d0eb3eb7..53c49540c 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsArticle.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsArticle.php @@ -19,7 +19,7 @@ class CmsArticle */ public $topic; /** - * @Column(type="string") + * @Column(type="text") */ public $text; /** diff --git a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php index 28b6553ce..ed136f245 100644 --- a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php @@ -509,6 +509,30 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase "select count(u.id) from Doctrine\Tests\Models\CMS\CmsUser u") ->getSingleScalarResult()); } + + public function testTextColumnSaveAndRetrieve() + { + $user = new CmsUser; + $user->name = 'Guilherme'; + $user->username = 'gblanco'; + $user->status = 'developer'; + + $this->_em->persist($user); + + $article = new \Doctrine\Tests\Models\CMS\CmsArticle(); + $article->text = "Lorem ipsum dolor sunt."; + $article->topic = "A Test Article!"; + $article->setAuthor($user); + + $this->_em->persist($article); + $this->_em->flush(); + $articleId = $article->id; + + $this->_em->clear(); + + $article = $this->_em->find('Doctrine\Tests\Models\CMS\CmsArticle', $articleId); + $this->assertEquals("Lorem ipsum dolor sunt.", $article->text); + } //DRAFT OF EXPECTED/DESIRED BEHAVIOR /*public function testPersistentCollectionContainsDoesNeverInitialize()