From 3bdf86922c62335199170974b6c275d11e7dda58 Mon Sep 17 00:00:00 2001 From: Eric GELOEN Date: Sat, 7 Jul 2012 17:27:32 +0200 Subject: [PATCH] Add clone query test --- .../Doctrine/Tests/ORM/Functional/PaginationTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php index 28e18f0de..0a2845582 100644 --- a/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/PaginationTest.php @@ -128,6 +128,17 @@ class PaginationTest extends \Doctrine\Tests\OrmFunctionalTestCase count($paginator); } + public function testCloneQuery() + { + $dql = "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u"; + $query = $this->_em->createQuery($dql); + + $paginator = new Paginator($query); + $paginator->getIterator(); + + $this->assertTrue($query->getParameters()->isEmpty()); + } + public function populate() { for ($i = 0; $i < 3; $i++) {