Commit 5af891d1 authored by beberlei's avatar beberlei

[2.0] DDC-197 - Add failing test on oracle as a challenge to fix OCI CLOB handling.

parent 146e2319
...@@ -19,7 +19,7 @@ class CmsArticle ...@@ -19,7 +19,7 @@ class CmsArticle
*/ */
public $topic; public $topic;
/** /**
* @Column(type="string") * @Column(type="text")
*/ */
public $text; public $text;
/** /**
......
...@@ -509,6 +509,30 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase ...@@ -509,6 +509,30 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase
"select count(u.id) from Doctrine\Tests\Models\CMS\CmsUser u") "select count(u.id) from Doctrine\Tests\Models\CMS\CmsUser u")
->getSingleScalarResult()); ->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 //DRAFT OF EXPECTED/DESIRED BEHAVIOR
/*public function testPersistentCollectionContainsDoesNeverInitialize() /*public function testPersistentCollectionContainsDoesNeverInitialize()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment