From 07f568e2b4b9bc0b3bd807144fe4c73600393bc1 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 25 Jun 2011 10:27:06 +0200 Subject: [PATCH] Add test for DDC-1227 regression --- tests/Doctrine/Tests/ORM/QueryBuilderTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/QueryBuilderTest.php b/tests/Doctrine/Tests/ORM/QueryBuilderTest.php index 963b64ce7..57eb82946 100644 --- a/tests/Doctrine/Tests/ORM/QueryBuilderTest.php +++ b/tests/Doctrine/Tests/ORM/QueryBuilderTest.php @@ -709,4 +709,16 @@ class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase $this->assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.username = 0', $qb->getDQL()); } + + /** + * @group DDC-1227 + */ + public function testAddFromString() + { + $qb = $this->_em->createQueryBuilder() + ->add('select', 'u') + ->add('from', 'Doctrine\Tests\Models\CMS\CmsUser u'); + + $this->assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u', $qb->getDQL()); + } } \ No newline at end of file