-
-
Save doctrinebot/114f4860e989197c35e3 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-1040 - https://github.com/doctrine/doctrine2/issues/1630
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php | |
index c753960..aef1051 100644 | |
--- a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php | |
+++ b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php | |
@@ -313,4 +313,23 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase | |
$this->assertTrue($result[0]->user instanceof \Doctrine\ORM\Proxy\Proxy); | |
$this->assertFalse($result[0]->user->__isInitialized__); | |
} | |
+ | |
+ /** | |
+ * @group DDC-1040 | |
+ */ | |
+ public function testSameNamedParameters() | |
+ { | |
+ $article = new CmsArticle; | |
+ $article->topic = "Test"; | |
+ $article->text = "Test"; | |
+ $this->_em->persist($article); | |
+ $this->_em->flush(); | |
+ $this->_em->clear(); | |
+ | |
+ $q = $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a where a.topic = :topic OR a.text = :topic"); | |
+ $q->setParameter('topic', 'Test'); | |
+ | |
+ $article = $q->getSingleResult(); | |
+ $this->assertInstanceOf('Doctrine\Tests\Models\CMS\CmsArticle', $article); | |
+ } | |
} | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment